Hello experts,
I am encountering a tricky problem during the configuration of my WAMP setup.
Here is what versions I use:
- Win 7
- Apache 2
- PHP 5.2.11
- MySQL 5.1
Apache and PHP work, I also get the mysql and mysqli information tables when I run a <?php phpinfo(); ?> script, so it does look like PHP is picking up the extensions correctly.
In my php.ini, the following mysql extensions are enabled:
extension=php_mysql.dll
extension=php_mysqli.dll
Also, mysql is installed as a service and I can log on to it on the cmd line as follows: mysql -u root -p
However, when I try to run a simple mysql test script as follows, I get no errors, but just a page showing "The connection was reset. The connection to the server was reset while the page was loading."
Code:
<?php
mysql_connect("localhost", "root", "1111") or die(mysql_error());
?>
Then, Firefox turns the URL
http://localhost/mysqltest.php into
http://www.localhost.com/mysqltest.php in the URL box.
Where to start error analysis? Since there are no PHP erros displayed, I checked the Apache log and find:
[Mon Nov 23 21:27:35 2009] [notice] Server built: Sep 28 2009 22:41:08
[Mon Nov 23 21:27:35 2009] [notice] Parent: Created child process 5188
[Mon Nov 23 21:27:35 2009] [notice] Child 5188: Child process is running
[Mon Nov 23 21:27:35 2009] [notice] Child 5188: Acquired the start mutex.
[Mon Nov 23 21:27:35 2009] [notice] Child 5188: Starting 64 worker threads.
[Mon Nov 23 21:27:35 2009] [notice] Child 5188: Starting thread to listen on port 80.
[Mon Nov 23 21:28:51 2009] [notice] Parent: child process exited with status 255 -- Restarting.
[Mon Nov 23 21:28:51 2009] [notice] Apache/2.2.14 (Win32) PHP/5.2.11 configured -- resuming normal operations
[Mon Nov 23 21:28:51 2009] [notice] Server built: Sep 28 2009 22:41:08
[Mon Nov 23 21:28:51 2009] [notice] Parent: Created child process 5052
[Mon Nov 23 21:28:51 2009] [notice] Child 5052: Child process is running
[Mon Nov 23 21:28:51 2009] [notice] Child 5052: Acquired the start mutex.
[Mon Nov 23 21:28:51 2009] [notice] Child 5052: Starting 64 worker threads.
[Mon Nov 23 21:28:51 2009] [notice] Child 5052: Starting thread to listen on port 80.
It looks like Apache restarts after I request the URL that attempts the mysql connection: Parent: child process exited with status 255 -- Restarting.
Other than that, I couldn't find any logs that can help me further.
Thanks for your help on this issue.
Regards,
Anders[/code]