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. But this
is not the case, why? Is it possible that mysql_connect() could not
read the "connection failed" message from mysql server?

I don't think this is case, because I thought that the problem could be that the script is timing out before MySQL can return a status code (possibly because MySQL is busy; network congestion, etc.)


However, after reading this:

"Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running."

I think the problem is not the script timing out, but rather it could be this:

"Note: Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as mysql.default_host in your PHP configuration and leave the server field blank."

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