Forum Moderators: coopster

Message Too Old, No Replies

Help needed with WAMP installation

         

bodycount

10:14 pm on May 2, 2006 (gmt 0)

10+ Year Member



I have Installed wamp5 and every time i try and input any thing into my database from a web page i get the following error

"Forbidden

You don't have permission to access /< on this server.
Apache/2.0.55 (Win32) PHP/5.1.2 Server at localhost Port 80"

mcavic

12:53 am on May 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In Linux, that means that either the document directory isn't readable by Apache, or that the document directory doesn't have an index.html.

If you're saying that you get that when you submit a form, check the path that the form action is pointing to.

bodycount

6:46 am on May 3, 2006 (gmt 0)

10+ Year Member



I am using a form to post data into the data base the form action is as follows.

<form action="<?=$_SERVER['PHP_SELF']?>" method="post">

I get the error when i post/submit the form.

bodycount

12:48 pm on May 3, 2006 (gmt 0)

10+ Year Member



I am using the lastest wamp5 if that helps.

The reason i was getting the error was beacuse i was using

$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");

instead of

$connection = mysqli_connect($host, $user, $pass) or die ("Unable to connect!");

but now when i try and post i get the following error.

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\connection.php on line 16

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\wamp\www\connection.php on line 16
Unable to select database!

---------------------
connection.php
---------------------
<?php
$host = "localhost";

$user = "root";

$pass = "**********";

$db = "********";

// open connection

$connection = mysqli_connect($host, $user, $pass) or die ("Unable to connect!");

// select database

mysql_select_db($db) or die ("Unable to select database!");

?>

jatar_k

4:08 pm on May 3, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



maybe this thread will help
[webmasterworld.com...]

bodycount

10:38 pm on May 4, 2006 (gmt 0)

10+ Year Member



Thanks for that.

I could not get WAMP to work, so i downloaded

Apache 2.0.55
PHP5
mysql
phpmyadmin

I thought i had configed every thing right but when i run any php page i get the contens of the php page displayed

example phpinfo script

<?php
phpinfo();
?>

and this is what is displayed on screen

<?php
phpinfo();
?>

any ideas?

bodycount

10:44 pm on May 4, 2006 (gmt 0)

10+ Year Member



i think i know what it is , there is a line missing out of httpd.conf ,what do i need to add into the httpd.conf so that apache uses php5?

Saikou

10:08 pm on May 7, 2006 (gmt 0)

10+ Year Member



In the second reply to this post, the poster referenced Unix...But, you're running on Windows. :)

So here's what you need to add to your httpd.conf file in order to load php5:

# For PHP 5 do something like this:

Search for 'LoadModule' and add this line after the other modules:

LoadModule php5_module "c:/php/php5apache2.dll"

Substituting C:/php/ for your own path

Search for 'AddType' and add this line after the others:

AddType application/x-httpd-php .php

Then go to the very end of your httpd.conf file and add this:

PHPIniDir "C:/php"

Substituting C:/php for your actual path that contains php.ini

Hope this helps!

Also, in php.ini you'll need to enable the extension for mysql...So search for

php_mysql.dll

And uncomment that line.

Regards,
Ken

P.S. - If you don't want to compile by yourself, I suggest using NetServer (search for it or look on HotScripts.com), it works pretty good.