php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #108 mysql_connect() fails intermitantly
Submitted: 1998-02-26 15:32 UTC Modified: 1998-02-28 06:06 UTC
From: leonatkinson at clearink dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0 Latest CVS OS: SunOS
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:
50 - 23 = ?
Subscribe to this entry?

 
 [1998-02-26 15:32 UTC] leonatkinson at clearink dot com
PHP3 is running as an apache module, as is PHP2 (2.0.2-dev).
We first saw this behavior upon upgrading after beta 5
came out.  PHP was re-compiled last night from CVS.

Extensions: PHP core, Apache, Basic Functions, PHP_DL,
PHP_dir, PHP_filestat, PHP_file, PHP_head, Sendmail,
Syslog, MySQL, Regular Expressions, gd, Oracle, Crypt,
DMB, browscap, PHP_pack.

MySQL version: 3.21.24-gamma

Example Code:
mysql_connect("bolt.clearink.com", "httpd");

Scripts in both PHP3 and PHP2 fail to connect when executing
the mysql_connect() command.  The error message is:  

Warning: MySQL: Unable to connect to server: Can't connect to MySQL server on bolt.clearink.com (126) in
content/functions/global_settings on line 78

Since this happens in both PHP3 and PHP2, we thought it
might be a problem with MySQL or Apache.  However,
neither of these were upgraded before we noticed this
behavior.  We did upgrade MySQL from a 3.19 version last
night, but the problem is still happening.

If we reload the page, the connect will eventually succeed.
The problem is much worse on PHP3, however, where it may 
take ten retries.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-28 06:06 UTC] zeev
Fixed!  Fix options:
1.  Get the latest CVS
2.  Get the patched MySQL file from http://il.php.net/~bourbon/mysql.c
3.  Wait for beta 6, due today or tomorrow
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC