php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7609 New connections made
Submitted: 2000-11-03 02:40 UTC Modified: 2002-05-26 13:28 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pietro dot pizzo at usa dot net Assigned:
Status: Not a bug Package: Sybase-ct (ctlib) related
PHP Version: 4.0.3pl1 OS: Solaris 2.6
Private report: No CVE-ID: None
 [2000-11-03 02:40 UTC] pietro dot pizzo at usa dot net
I use PHP4.0.3pl1 in my test environment and PHP3.0.16 in the production environment.
While making multiple connections to Sybase (Open Client version 11.9.2)
with the same arguments, PHP3 returns always the same link identifier but PHP4 not.
It seems that PHP4 makes new connections when calling sybase_connect() repeatedly.

Here is my PHP script:
<?php
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
$conn = sybase_connect("SYBASE", "username", "passwd"); echo $conn."<br>";
?>

The results are the followings:
PHP3:
1
1
1
1
1
1
1
1
1
1

PHP4:
Resource id #1
Resource id #1
Resource id #1
Resource id #1
Resource id #1
Resource id #2
Resource id #2
Resource id #2
Resource id #2
Resource id #3

The configure line for PHP4 is:
./configure --with-apache=../apache \
	--with-config-file-path=/usr/local/apache/etc \
	--with-sybase-ct=/sybase --with-sybase-db=/sybase \
	--with-oci8 --with-oracle \
	--with-gdbm --with-gd --with-pdflib --with-zlib \
	--with-jpeg-dir=/usr/local --with-tiff-dir=/usr/local \
	--enable-calendar --enable-dbase --enable-yp \
	--enable-versioning --enable-track-vars --enable-ftp \
	--enable-trans-sid --enable-sysvsem --enable-sysvshm

The web server is Apache 1.3.12 running on Solaris 2.6.
The compiler is GNU gcc 2.95.2.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-06 22:05 UTC] joey@php.net
This looks to me like a simple difference in the way resources are
handled. Could one of the core guys verify this?
 [2001-02-11 15:09 UTC] andre@php.net
I guess this should not happen, anyone with sybase should
verify this...
 [2002-02-14 02:23 UTC] matt at fanhome dot com
Verified, Sybase ASE 12.5 (CT libs) on Red Hat Linux 6.2 with PHP4.1.1
 [2002-05-26 13:28 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat May 25 06:01:27 2019 UTC