php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9048 problem to open several connections on 4.0.4pl1 that worked on 4.0.2
Submitted: 2001-02-01 08:39 UTC Modified: 2001-02-13 12:14 UTC
From: olivier dot gondouin at planet-service dot fr Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0.4pl1 OS: Debian GNU/Linux 2.2r2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: olivier dot gondouin at planet-service dot fr
New email:
PHP Version: OS:

 

 [2001-02-01 08:39 UTC] olivier dot gondouin at planet-service dot fr
There's only one postgresql version, only one php script (and then, only one base/table for the test).
Both versions of php (and apache) are running at the same time.

The sample program:
<?
for ($j=0 ; $j < 10 ; $j++)
{
  echo "open connection $j<br>";
  $cn = pg_connect("host=xxxx port=5432 user=xxx password=xxxx dbname=xxxx");

  $sql = "Select * from os_log limit 10;";
  $rs = pg_exec($cn, $sql);

  if ($rs == false)
    echo 'bug<br>\n';
  else
    echo 'ok<br>\n';
  flush();
}
?>

----------------

php 4.0.2 result:

open connection 0
ok
open connection 1
ok
open connection 2
ok
open connection 3
ok
open connection 4
ok
open connection 5
ok
open connection 6
ok
open connection 7
ok
open connection 8
ok
open connection 9
ok
----------------
php 4.0.4pl1 result:
open connection 0
ok
open connection 1
ok
open connection 2
ok
open connection 3

Warning: 1 is not a valid PostgreSQL link resource in /opt/web/netos.dev/db.php on line 7
bug
open connection 4
ok
open connection 5
ok
open connection 6
ok
open connection 7

Warning: 5 is not a valid PostgreSQL link resource in /opt/web/netos.dev/db.php on line 7
bug
open connection 8
ok
open connection 9
ok

----------------

php compilation options:

for 4.0.4pl1:

./configure --prefix=/opt/php-4.0.4pl1.test --with-apache=../apache_1.3.12 \
--with-config-file-path=/opt/php-4.0.4pl1.test/lib \
--enable-track-vars --enable-ftp --with-readline --with-imap=/opt/c-client \
--with-mysql=/opt/mysql --with-pgsql=/opt/postgresql \
--enable-trans-sid \
--enable-sysvsem --enable-sysvshm --enable-memory-limit \
--enable-debug=no --with-ttf=/opt/freetype --with-t1lib=/opt/t1lib \
--with-regex=php --with-xml \
--with-jpeg-dir=/opt/jpeg --with-tiff-dir=/opt/tiff --with-png-dir=/opt/libpng \
--with-zlib-dir=/opt/zlib --with-gd=/opt/gd \
--enable-sockets  \
--with-swf=/opt/libswf --with-sablot \
--with-pdflib=/opt/pdflib --with-dom=/opt/libxml2 --enable-bcmath

php4.0.2:
There's not --with-dom due to configuration/compilation  problems, but it isn't directly linked with postgresql:

./configure --prefix=/opt/php-4.0.2.test2 --with-apache=../apache_1.3.12 \
--with-config-file-path=/opt/php-4.0.2.test2/lib \
--enable-track-vars --enable-ftp --with-readline --with-imap=/opt/c-client \
--with-mysql=/opt/mysql --with-pgsql=/opt/postgresql \
--enable-trans-sid \
--enable-sysvsem --enable-sysvshm --enable-memory-limit \
--enable-debug=no --with-ttf=/opt/freetype --with-t1lib=/opt/t1lib \
--with-regex=php --with-xml \
--with-jpeg-dir=/opt/jpeg --with-tiff-dir=/opt/tiff --with-png-dir=/opt/libpng \
--with-zlib-dir=/opt/zlib --with-gd=/opt/gd \
--enable-sockets \
--with-swf=/opt/libswf --with-sablot \
--with-pdflib=/opt/pdflib  --enable-bcmath


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-13 12:14 UTC] thies@php.net
fixed in CVS
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 01:01:35 2025 UTC