php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54832 unable to connect to mysql
Submitted: 2011-05-18 15:03 UTC Modified: 2011-06-03 21:50 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: giorgio dot liscio at email dot it Assigned: cataphract (profile)
Status: Closed Package: MySQL related
PHP Version: 5.3.7 OS: windows 7 x64 ultimate
Private report: No CVE-ID: None
 [2011-05-18 15:03 UTC] giorgio dot liscio at email dot it
Description:
------------
hi, with same apache + os + mysql installation and php 5.3.6 works everything good

with trunk of today (not tested on previous trunks) i get always

Warning: mysqli_connect(): (HY000/2002): Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato.
 in E:\Lavoro\Software\Apache2\htdocs\index.php on line 20


~translation from italian:

unable to establish the connection. invalid answer in the time interval or no answer from the host


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-21 21:33 UTC] giorgio dot liscio at email dot it
-PHP Version: trunk-SVN-2011-05-18 (snap) +PHP Version: 5.4.0-dev
 [2011-05-21 21:33 UTC] giorgio dot liscio at email dot it
same error on latest 5.4 revision too

May 21 2011 20:50:15 

i'm using the binaries of windows.php.net
http://windows.php.net/downloads/snaps/php-5.4/r311300/
 [2011-05-26 14:50 UTC] johannes@php.net
-Status: Open +Status: Feedback
 [2011-05-26 14:50 UTC] johannes@php.net
This works on other systems quite well. Are you sure you have no firewall or such? Pleas etry using 127.0.0.1 instead of localhost (there had been issues due to Ipv6 vs. IPv4 in the past)
 [2011-05-26 14:57 UTC] giorgio dot liscio at email dot it
-Status: Feedback +Status: Open
 [2011-05-26 14:57 UTC] giorgio dot liscio at email dot it
hi johannes, i tested with every combination, including firewall issues

but updating php latest revisions i noticed that not always driver throws that error

sometimes on a just ran server (or thread?) some queries work, 
and sometimes when i F5 my browser the same queries continue to work, but if i hold down f5 for a lot of continuous reloads the error HY000/2002 is thrown

hope this helps to fix the bug
 [2011-05-26 15:53 UTC] johannes@php.net
Have you tried 127.0.0.1 instead of localhost? Or are you actually connecting to a remote host? As mentioned in my previous statement we had such timeouts due to IPv6 issues in the past. While then it doesn't make sense if it works sometimes ...

My next best guess would be to try using a network analyzer (wireshark or such) to log the network traffic. Not sure I have a better idea (while I myself am not to familiar with such low level analysis on windows, maybe there are simpler ways ...)
 [2011-05-26 16:47 UTC] giorgio dot liscio at email dot it
yes i've tried with 127.0.0.1

wireshark can't capture localhost packets due to a windows limitation :rage:

i have to try in my network, i will update you

thank you
 [2011-05-30 17:19 UTC] neweracracker at gmail dot com
Hello,

There is a similar bug:
bug #54896

It is related to this commit
svn.php.net/viewvc?view=revision&revision=310691

Thank you.
 [2011-05-30 21:28 UTC] giorgio dot liscio at email dot it
can you reproduce the problem?
 [2011-05-31 02:21 UTC] neweracracker at gmail dot com
Yes. I can reproduce the problem.
I am sure devs will fix then when they have time available.
 [2011-05-31 02:38 UTC] pajoye@php.net
-Status: Open +Status: Critical -Assigned To: +Assigned To: cataphract
 [2011-05-31 02:38 UTC] pajoye@php.net
Pls check this one as well, regression introduced by the browswer fix (wondering 
what can cause that in mysql/socket code.)
 [2011-05-31 12:56 UTC] giorgio dot liscio at email dot it
-PHP Version: 5.4.0-dev +PHP Version: 5.3.7
 [2011-05-31 12:56 UTC] giorgio dot liscio at email dot it
changed version according to what neweracracker at gmail dot com says
thank you in advance for fixing this
byes
 [2011-06-01 13:24 UTC] cataphract@php.net
-Status: Critical +Status: Feedback
 [2011-06-01 13:24 UTC] cataphract@php.net
If you are using the apache handler, please make sure you are also using the Apace binaries from Apache Lounge.
 [2011-06-01 14:44 UTC] giorgio dot liscio at email dot it
yes i'm using binaries (vc9) of apache lounge (Apache 2.2.19)
mysql version 5.5.13
with php 5.4 and trunk vc9 ts (revision of today)
 [2011-06-01 16:07 UTC] cataphract@php.net
I can't reproduce this with both PHP 5.3.7-dev and trunk (5.5.0-dev) as apache handlers (ts, vc9) and mysql 5.5.9 listening on an IPv4 socket and an IPv6 socket.

At this point either a dump of the network traffic or at least a log from process monitor would help.

Thanks
 [2011-06-01 16:14 UTC] neweracracker at gmail dot com
Please try MySQL 5.1.57 listening 127.0.0.1:3306 without IPv6 listen but with IPv6 enabled in OS.

Thank you.
 [2011-06-03 18:49 UTC] giorgio dot liscio at email dot it
-Status: Feedback +Status: Assigned
 [2011-06-03 18:49 UTC] giorgio dot liscio at email dot it
news?
 [2011-06-03 18:51 UTC] cataphract@php.net
-Status: Assigned +Status: Feedback
 [2011-06-03 18:51 UTC] cataphract@php.net
Please try the latest snapshot. This has probably been fixed in revision 311730.

Thank you.
 [2011-06-03 21:50 UTC] giorgio dot liscio at email dot it
-Status: Feedback +Status: Closed
 [2011-06-03 21:50 UTC] giorgio dot liscio at email dot it
resolved for me (i've tested only the trunk)
thank you!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC