ID: 28159 Updated by: [EMAIL PROTECTED] Reported By: johnny at skydiveflorida dot net -Status: Open +Status: Bogus Bug Type: PostgreSQL related Operating System: Debian linux PHP Version: 4.3.4 New Comment:
Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- 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. You really *do* need to try the latest version first. Previous Comments: ------------------------------------------------------------------------ [2004-04-26 17:46:30] johnny at skydiveflorida dot net Description: ------------ When I make a call to pg_pconnect(), I get the error: Warning: pg_pconnect(): Cannot create new link. Too many open links (0). My system configuration: seven:/etc/php4/apache# dpkg -l | grep php4 ii php4 4.3.4-4 A server-side, HTML-embedded scripting langu ii php4-curl 4.3.4-4 CURL module for php4 ii php4-gd2 4.3.2+rc3-2 GD module (with GD2) for php4 ii php4-mysql 4.3.4-4 MySQL module for php4 ii php4-pear 4.1.2-6woody3 PEAR - PHP Extension and Application Reposit ii php4-pgsql 4.3.3-2 PostgreSQL module for php4 ii php4-xslt 4.3.4-4 XSLT module for php4 seven:/etc/php4/apache# dpkg -l | grep postgres ii postgresql 7.4.2-0.backpo Object-relational SQL database, descended fr ii postgresql-cli 7.4.2-0.backpo Front-end programs for PostgreSQL ii postgresql-doc 7.2.1-2woody4 Documentation for the PostgreSQL database. PHPInfo() for pgsql: pgsql PostgreSQL Support enabled PostgreSQL(libpq) Version 7.4.2 Multibyte character support enabled SSL support enabled Active Persistent Links 0 Active Links 0 Directive Local Value Master Value pgsql.allow_persistent On On pgsql.auto_reset_persistent Off Off pgsql.ignore_notice Off Off pgsql.log_notice Off Off pgsql.max_links 150 150 pgsql.max_persistent 100 100 Note that .max_links and .max_persistent were originally set to unlimited in php.ini (ie -1) but I tried changing the values to determine if the outcome would be different. I realise that bug reports for previous versions (6+ months ago) have been submitted and answered, but I've read them and they do not solve the issue, they just suggest using the latest stable version of php4 Reproduce code: --------------- function connect() { $this->dsn = "host='" . $this->hostName . "' port='" . $this->port . "' dbname='" . $this->database . "' user='" . $this->userName . "' password='". $this->passwd . "'"; $this->link = pg_pconnect($this->dsn); ... return $this->link; } This code was tested and working using previous version of php4 / php4-pgsql packages as described above. The line that causes the error is $this->link = pg_pconnect(...); Expected result: ---------------- expect connection to be made to the postgres database. Actual result: -------------- Actual result is a warning, not a crash. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28159&edit=1