Hi all,
Just trying to setup the Apache, PHP, MySQL trio on my computer for the first time, and seem to be facing a problem many people have - the connection between PHP and MySQL.
I have got Apache (2.2), PHP (5.3.3) and MySQL (5.1) to work independently.
However, when I try to use a test file (mysql_test.php placed in the htdocs folder) to test the connection between PHP and MySQL I get the following error:
--
Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mysql_test.php on line 9
Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mysql_test.php on line 9
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mysql_test.php on line 9
--
I have tried everything I could find, including the guide by wildteen88:
1. I have removed the semicolon before extension=php_mysql.dll and extension=php_mysqli.dll
2. I have changed the line and removed the semicolon before extension_dir = "C:\php\ext"
3. I have added the file libmySQL.dll file to C:\Windows
4. I have added C:\php to the Windows Path system variable
5. Restarted the computer
6. Restarted the Apache server
I have attached my php.ini and mysql_test.php files to this message.
Really don't know what else to do. If you need any more info, let me know.
Thanks
[attachment deleted by admin]