|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-06-02 16:46 UTC] conor dot kerr_php at dev dot ceon dot net
Description:
------------
I've been trying the PHP 5.3.x snapshots out for the past two weeks on three separate Vista systems and consistently got timeouts when a mysql_connect function was encountered.
Tried rebooting into Windoze XP on one of the systems and installing on it and everything worked perfectly straight away.
Tried everything I could on the Vista systems, removing all copies of libmysql.dll from the system, changing the PATH, removing the path, (restarting after all changes) but every time PHP the mysql_connect function times out.
Are the snapshots tested on XP only? I've spent almost a full working day over the past two weeks trying to get 5.3 running in my normal environment so that I could start using the namespace functionality. Sadly I now have no choice but to use XP anytime I need to run anything I write as 5.3 clearly isn't compatible with the combination of Vista and MySQL. :(
Any PHP script that doesn't use MySQL works fine on all three Vista systems.
Reproduce code:
---------------
<?php
print "connecting...";
mysqli_connect('localhost:3307', 'root', '');
?>
Expected result:
----------------
No errors. :)
Actual result:
--------------
Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3307) in C:\Program Files\Glossword-WAMP\htdocs\test8.php on line 3
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\Glossword-WAMP\htdocs\test8.php on line 3
PatchesStupid (last revision 2011-09-29 05:33 UTC by i at gmail dot com)ii (last revision 2011-09-29 05:31 UTC by sfvjf at gmail dot com) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
Hi Andrey, Thanks for replying. You have found the problem! Running the following test script: <?php $httpfile = file_get_contents("http://127.0.0.1/foo.txt"); print "File contents read using 127.0.0.1: \n\n" . $httpfile . "\n\n"; $httpfile = file_get_contents("http://localhost/foo.txt"); print "File contents read using localhost: \n\n" . $httpfile . "\n\n"; ?> Gives the following results: --- File contents read using 127.0.0.1: This is the content of foo. Warning: file_get_contents(http://localhost/foo.txt) [function.file-get-contents]: failed to open stream: 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 E:\_CEON\Web\test\php_streams.php on line 7 Fatal error: Maximum execution time of 60 seconds exceeded in E:\_CEON\Web\test\php_streams.php on line 7 --- So PHP 5.3 can't resolve localhost to 127.0.0.1 on Vista. Should I update this bug to show that it is a streams problem? Or close this bug and start a new one for Vista + Streams in 5.3? Thanks again for the reply. All the best... Conor