| View previous topic :: View next topic |
| Author |
Message |
ahlandberg
Joined: 23 Nov 2009 Posts: 1
|
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: | <?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] |
|
| Back to top |
|
 |
Seventy
Joined: 25 Nov 2009 Posts: 2
|
Posted: Wed Nov 25, 2009 2:35 am Post subject: |
|
|
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.
I would appreciate any advice.
Thanks. |
|
| Back to top |
|
 |
lostboy

Joined: 02 May 2004 Posts: 5915 Location: toronto, canada
|
Posted: Wed Nov 25, 2009 5:33 am Post subject: |
|
|
Just for fun, check the windows firewall. Some updates turn this on and it may block the access to the server. _________________ Lostboy
Cat, the other other white meat
Please read Posting Etiquette before posting
You can always try Google |
|
| Back to top |
|
 |
Seventy
Joined: 25 Nov 2009 Posts: 2
|
Posted: Fri Nov 27, 2009 8:19 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|