php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2317 ifx_connect holds non-exclusive lock forever
Submitted: 1999-09-16 17:41 UTC Modified: 1999-09-22 16:24 UTC
From: mike at nerdfest dot org Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.12 OS: linux and sco
Private report: No CVE-ID: None
 [1999-09-16 17:41 UTC] mike at nerdfest dot org
It seems as though apache/php are holding my connection open even though I am not using pconnect.  After every query "onstat" shows that there is still one lock.  If I try to add/delete an index Informix gives me the "hey, you don't have exclusive rights" error.  If I shutdown apache, then my add/delete works just fine.  If have tried this with a few combinations of unix/apache/php with the same results.  Those flavors are:

apache1.3.9/php3.0.12/sco5.0.5 odbc to itself,
same machine above odbc to sco5.0.0, and
apache1.3.6/php3.0.7/redhat6.2 odbc to both sco boxes

Both sco machines are running ods 7.12 and the redhat machine has SE.

In case you were wondering, the machine that has to odbc to itself is because I get informix error -27000 when connecting via php using shared memory.  Could be related.

I compiled php --with-informix. I don't think there is anything special about either of the installs.  The example below is more or less what I am using.

<?
putenv ("INFORMIXSERVER=dbs");
$conn_id = ifx_connect (database, "username", "password");
$res_id = ifx_prepare ('set isolation to dirty read', $conn_id);
ifx_do ($res_id);
$thestring = "select * from 'username'.table where field = '$some_input'";
eval ("\$thestring = \"$thestring\";");
$res_id = ifx_prepare ($thestring, $conn_id);
ifx_do ($res_id);
$row = ifx_fetch_row ($res_id, "NEXT");
ifx_free_result ($res_id);
ifx_close ($conn_id);
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-22 16:24 UTC] mike at nerdfest dot org
Ok, so it seems that even after a dirty read select that you have to "commit work".  It doesn't seem right, but it works.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 11:00:02 2026 UTC