Edit report at https://bugs.php.net/bug.php?id=37527&edit=1
ID: 37527
Updated by: cmb@php.net
Reported by: bhines at alumni dot ucsd dot edu
Summary: Crash - odbc_exec on closed pconnect
-Status: Open
+Status: Closed
Type: Bug
Package: ODBC related
Operating System: Windows XP
PHP Version: 5.3.0beta1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
As of PHP 5.4.19 at least, the bug has been fixed. Instead of
crashing, there is now a warning:
Warning: odbc_exec(): SQLAllocStmt error 'Invalid Handle' in ...
on line ...
Previous Comments:
------------------------------------------------------------------------
[2009-02-17 18:05:20] bhines at alumni dot ucsd dot edu
updated version.
------------------------------------------------------------------------
[2009-02-17 17:53:24] paul at quakenet dot org
Felipe,
I can reproduce this (5.3 branch) and the patch attached does't
appear to fix this issue.
This issue only seems to occur when returning $mydb. If the
odbc_pconnect is moved outside of pdb_Connect or the code function
definition is changed to function &pdb_Connect(), the issue does not
occur.
With:
$mydb = pdb_Connect();
odbc_close_all();
var_dump($mydb);
Output is: resource(5) of type (odbc link persistent)
Changing the code to not return $mydb e.g. call odbc_pconnect within
printPage, result of the var_dump is: resource(5) of type (Unknown)
------------------------------------------------------------------------
[2008-10-21 22:32:07] felipe@php.net
Well, I can't reproduce it.
------------------------------------------------------------------------
[2008-10-21 11:38:01] jani@php.net
Was that fix applied? Does this bug exist in PHP_5_2 branch still? If so, please update the
version..
------------------------------------------------------------------------
[2008-02-17 17:22:46] felipe@php.net
Possible fix:
http://felipe.ath.cx/diff/bug37527.diff
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=37527
--
Edit this bug report at https://bugs.php.net/bug.php?id=37527&edit=1