Posted: Mon Nov 23, 2009 10:35 pm Post subject: PHP, MySQL connection problem
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:1]<?php
mysql_connect("localhost", "root", "1111") or die(mysql_error());
?>[/code:1]
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.
I thought I would chip in to say that I also have this exact same problem too.
Windows 7 RC1 + WAMP 2.0i.
Same symptoms - Can load normal PHP pages fine, but when using a page that requires any kind of mysql connection, the page just displays "the connection was reset". Even trying to use the inbuilt phpmyadmin causes the same error.
My apache log file is showing the same thing as the post above.
It had been working for weeks fine, but about 2 weeks ago, started to do this. I wondered if it may have been a Windows Auto update that caused it, but I uninstalled a few of the recent ones and that didn't help. I've also tried uninstalling wamp, deleting the wamp folder + data and re-installing to no avail.
Thanks for the suggestion. I'd tried allowing the various aspects of WAMP exes through the firewall and also turning the firewall off by using the firewall screen and also stopping the firewall service in windows. None of these helped sadly.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum