From:             ashoat at gmail dot com
Operating system: CentOS 5.2 x64_86
PHP version:      5.2.6
PHP Bug Type:     ODBC related
Bug description:  PHP (cleanup?) runs infinite loop after ODBC used

Description:
------------
I have PHP 5.2.6 compiled as CGI wrapped with suPHP installed on a CentOS
5.2 x64_86 box. I compiled PHP with --with-unixODBC, version 2.2.11. 

After I open an ODBC connection and then close it, I am able to continue
executing PHP code. However, when it is time to cleanup and exit the
script, the parser stalls and does not close the stream.

This has been tested through the commandline and httpd. When I force close
the command-line executor after the cleanup stalls, I get "Segmentation
fault" appended to the end of the stream before it closes.

Reproduce code:
---------------
<?php
$connection = odbc_connect("DRIVER={MySQL ODBC 3.51
Driver};Server=localhost;Database=database;Option=3","username","password");
odbc_close($connection);

for($i=0;$i<25;$i++) echo "This is <b>after</b> the connection is
closed.<br/>";
echo "Something is clearly wrong with PHP's cleanup.";

?>

Expected result:
----------------
The expected result is that the code executes and the stream then closes.

If the ODBC functions caused a block and did not close, a timeout would be
expected and the code towards the end of the file would not execute.
However, the code at the end does execute (see here:
http://www.heliohost.org/test.php). 

Therefore, it seems that the issue here is with PHP's cleanup methods.

Actual result:
--------------
See here: http://www.heliohost.org/test.php

-- 
Edit bug report at http://bugs.php.net/?id=45894&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45894&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45894&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45894&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45894&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45894&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45894&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45894&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45894&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45894&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45894&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45894&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45894&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45894&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45894&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45894&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45894&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45894&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45894&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45894&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45894&r=mysqlcfg

Reply via email to