ID: 42204
User updated by: jcuello at sitrack dot com
Reported By: jcuello at sitrack dot com
-Status: Open
+Status: Closed
Bug Type: Informix related
Operating System: Linux, Windows XP
PHP Version: 4.4.7
New Comment:
The script opens a new connection because de it uses a new apache
server process. The problem about a new connection is not concerned to
php, instead of that it depends on how apache manage each child process.
The gap about 20 seconds refer to the KeepAliveTimeout varible in the
httpd.conf apache config file.
Previous Comments:
------------------------------------------------------------------------
[2007-08-05 14:32:28] jcuello at sitrack dot com
On Linux too.
------------------------------------------------------------------------
[2007-08-03 20:04:00] jcuello at sitrack dot com
Description:
------------
Every call to ifx_pconnect() opens a connection to the database server
instead of using the connection previously created. This situation take
place when the gap between each call is about 20 seconds or more. We
monitor the connections to the database server with the informix command
'onstat -g ses'. The connections remains open until the apache server is
stopped.
Reproduce code:
---------------
<?php
$conn_id = ifx_pconnect ("[EMAIL PROTECTED]", "user", "pass");
?>
Expected result:
----------------
I expect the script doesn't open a new connection to the database
server if it find a connection already established. I expect it uses the
connection already open.
Actual result:
--------------
The script open a new connection to the server if the gap between each
call to the script is about 20 seconds or more. The connections remains
open until de apache server is stopped.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42204&edit=1