php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3213 odbc_close with bad connection ID causes server to hang
Submitted: 2000-01-14 06:50 UTC Modified: 2000-06-20 12:09 UTC
From: phil at dialsolutions dot co dot uk Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0 Beta 3 OS: NT4 SP4 IIS4
Private report: No CVE-ID: None
 [2000-01-14 06:50 UTC] phil at dialsolutions dot co dot uk
I'm using the downloaded ISAPI binary of php4.0b3 on NT4 SP4 with IIS4.

Having just converted a script from odbc calls to use direct mysql calls, I had a problem with IIS hanging. I had forgotten to remove one odbc_close call, and was passing the connection id from mysql_connect to the odbc_close call.

php generated a suitable warning message:

Warning: Supplied resource is not a valid ODBC-Link resource in f:\php\nyorks\mysql\index.php on line 107

but then server ourput to the browser stalled.

The index.php file was left open, and I was unable to stop the server using 'net stop iisadmin'

After a reboot, subsequent attempts to reproduce the problem no longer caused the server to hang, but after the output page was displayed, the index.php file remained open until the server was stopped using net stop iisadmin (which now works ok).

I realise that is my own stupid fault for having the faulty odbc_close in the script, but php probably ought to react more kindly to the error.

The following script is sufficient to show the problem.

<?php
 $db=mysql_connect();
 if(!$db)
 {
  die("dead");
 }
 odbc_close($db);
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-14 13:39 UTC] phil at dialsolutions dot co dot uk
Sorry folks. I now realise that the 'keeping the index.php file open' problem is not caused by the call to odbc_close, in fact it always seems to happen to script files once they have been processed by the isapi module (this is a pain for development because it means you can't save new versions of the script file without first stopping iisadmin and restarting.

Since I can't reproduce the more major problem at the start of this bug report, I guess that we won't be able to track down the problem.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 23:01:30 2024 UTC