#25628 [Com]: Cannot Connect to postgres database
| From: | mdchaney at michaelchaney dot com | Date: | Wed, 09 Aug 2006 22:38:00 +0000 |
| Subject: | #25628 [Com]: Cannot Connect to postgres database | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100617@lists.php.net to get a copy of this message | ||
ID: 25628
Comment by: mdchaney at michaelchaney dot com
Reported By: matt at coffeecup dot com
Status: No Feedback
Bug Type: PostgreSQL related
Operating System: Red Hat Enterprise Linux ES 2.1
PHP Version: 4.3.4-dev
New Comment:
I just had this same problem. The problem stemmed from have
two sets of "extension=" lines, first in /usr/local/etc/
php.ini, also in /usr/local/etc/php/extensions.ini. Removing
them from the php.ini file solved the problem.
Previous Comments:
------------------------------------------------------------------------
[2003-09-29 05:56:49] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2003-09-22 19:06:59] iliaa@php.net
How many apache children do you have at maximum and how many
connections (at maximum) does your postgreSQL allow to connect?
------------------------------------------------------------------------
[2003-09-22 14:59:13] matt at coffeecup dot com
This version had the exact same problem.
------------------------------------------------------------------------
[2003-09-22 12:23:20] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-09-22 11:58:16] matt at coffeecup dot com
Description:
------------
I upgraded to php 4.3.3, and started receiving this error when
connecting to postgres:
PHP Warning: pg_connect(): Cannot create new link. Too many open links
(0).
I use the same configure line with php 4.3.2:
./configure --with-apxs=/usr/local/apache/bin/apxs --with-curl
--with-xml --with-mysql=/usr --with-ssl --with-mcrypt
--enable-xslt-sablot --with-gd --with-jpeg-dir=/usr/bin/cjpeg
--with-zlib --with-ttf --with-pgsql
php.ini file remains the same:
; Maximum number of links (persistent+non persistent). -1 means no
limit.
pgsql.max_links = -1
When I re-install 4.3.2, the problem goes away.
Reproduce code:
---------------
$bd_db = pg_connect ("host=$hostname dbname=$database_name
user=$username password=$password");
Expected result:
----------------
A connection to the database given
Actual result:
--------------
PHP Warning: pg_connect(): Cannot create new link. Too many open links
(0).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25628&edit=1