[PHP-DEV] PHP 4.0 Bug #2863: call to mysql_connect fails after calling mysql_close From: tomwk <email protected>
Date: 11/29/99

From: tomwk <email protected>
Operating system: Redhat
PHP version: 4.0 Beta 3
PHP Bug Type: MySQL related
Bug description: call to mysql_connect fails after calling mysql_close

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.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>