RE: Is this a mysql_connect() bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux