php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3516 mysql_connect timeout
Submitted: 2000-02-17 10:37 UTC Modified: 2000-07-22 19:39 UTC
From: joerg dot koenning at gmx dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.14 OS: Linux and Windows-NT
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 26 = ?
Subscribe to this entry?

 
 [2000-02-17 10:37 UTC] joerg dot koenning at gmx dot de
Dear people at PHP.net.
We are using PHP and MySQL for our web-services. In some cases the connection from PHP to the MySQL-database might fail using mysql_connect because of the fact that the MySQL-server is down. In that case the mysql_connect tries to connect to the database for a long time (>30 sec.). After this time it comes back with an "connection failed"-error.
Is there a way to set this "mysql_connect-timeout" by script (e.g. to 5 seconds)?
Kind regards,
Joerg Koenning
joerg.koenning@gmx.de

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-22 19:39 UTC] mrobinso at cvs dot php dot net
You can set the timeout of the script itself, and/or
prepend @ to the mysql_connect() function to disable
the error message and show something a little nicer,
including the rest of the script.

This isn't really a bug though, so closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 16:01:29 2024 UTC