php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18534 ifx_close() leaves open session
Submitted: 2002-07-24 05:55 UTC Modified: 2003-10-07 05:36 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: martin at ctco dot lv Assigned:
Status: Closed Package: Informix related
PHP Version: 4.2.1 OS: Sun Solaris 8
Private report: No CVE-ID: None
 [2002-07-24 05:55 UTC] martin at ctco dot lv
When working with tranaztions. ifx_close() does not close session.

I have following script:
<?
$db=ifx_connect("db","uid","pwd");

$result=ifx_query("begin work",$db);
$result=ifx_query("insert into m_test1 (i) values('1');", $db);
$result=ifx_query("select * from m_test1;", $db);
while($row=ifx_fetch_row($result)) {
        echo($row['i']);
}
//$result=ifx_query("rollback work;", $db);
echo("rollback");
$result=ifx_query("select * from m_test1;", $db);
while($row=ifx_fetch_row($result)) {
        echo($row['i']);
}
ifx_close($db);

?>


If i dont execute $result=ifx_query("rollback work;", $db); and just call ifx_close session is not closed and autmatic rollback is not executed (as it must be) but connection to Informix database stays with lock on this row.

Usualy you must have rollback or commit; But to avoid problems with bad code or other coding probs after calling ifx_close() session must be rolled back and closed.


Martins Junkers

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-07 01:44 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2003-10-07 05:36 UTC] nobbie@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC