|
Posted by Tom Soyer on 01/30/05 16:19
Thanks everyone for all the help. I found the problem. It has to do
with a bug in my error handler class that my script loaded prior to
executing mysql_connect(). Once I removed the error handler class,
mysql_connect() started to behave as expected. My bad.
Tom
On Sun, 30 Jan 2005 01:16:10 -0600, Michael Sims
<michaels@crye-leike.com> wrote:
> 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
>
>
Navigation:
[Reply to this message]
|