php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2863 call to mysql_connect fails after calling mysql_close
Submitted: 1999-11-30 04:20 UTC Modified: 2000-07-23 02:53 UTC
From: tomwk at audiogalaxy dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0 Beta 3 OS: Redhat
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tomwk at audiogalaxy dot com
New email:
PHP Version: OS:

 

 [1999-11-30 04:20 UTC] tomwk at audiogalaxy dot com
I've got a long running cgi script that I use to keep track of some statistics.  It just sits in the background and checks the database periodically.  This script worked fine under the most recent version of php3:

#!/usr/local/bin/php -q
<script language=php>
set_time_limit( 0 );

// set up variables

while( true ) {
    mysql_connect( $server, $user, $password );
    mysql_select_db( $dbName );
    $results = mysql_query( $query );
    $row = mysql_fetch_array( $results );
	
    // do some stuff

    mysql_free_result( $results );
    mysql_close();

    sleep( 15*60 );
}
</script>

Email me if you need any more information.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-09 18:09 UTC] zeev at cvs dot php dot net
How does mysql_connect() fail?  What kind of error message are you getting?  What does mysql_error() return?
 [2000-07-23 02:53 UTC] zak at cvs dot php dot net
Zeev contacted bug poster over a month ago.
Closing bug.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 27 03:00:02 2025 UTC