|
Posted by Michael Sims on 01/30/05 09:16
tom soyer wrote:
> Thanks for the error handling code. I think PHP still has a basic
> problem. If mysql sever connection times out because wrong username or
> password was used, then mysql_connect() should return FALSE.
It does, at least for me on PHP 4.3.10 connecting to a local MySQL 4.0.23
server on Debian. It returns a boolean false, and a warning is triggered:
Warning: mysql_connect(): Access denied for user: 'user@localhost' (Using
password: YES) in ...
If I give it a server name it cannot connect to (due to a firewall blocking
the connection, for example) it will hang for about 60 seconds then return
false, triggering a warning:
Warning: mysql_connect(): Can't connect to MySQL server on ...
I was going to suggest that you run a cli test script and trace the system
calls to see what's going on but then I saw that you're using Windows. I'm
not sure if there is an strace/truss equivalent for it (anyone know)?
Navigation:
[Reply to this message]
|