ID:               45894
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ashoat at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         ODBC related
 Operating System: CentOS 5.2 x64_86
 PHP Version:      5.2.6
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-08-22 20:09:46] ashoat at gmail dot com

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 this bug report at http://bugs.php.net/?id=45894&edit=1

Reply via email to