Page 1 of 1

Help!Problems with postgres 4.3.3 don't hapen in 4.3.2

Posted: Tue Dec 30, 2003 11:22 am
by armindo
Hi

Need urgent! Help....


My index.php returns the following error:

"Warning: pg_connect(): Cannot create new link. Too many open links (0). in /home/armindo/public_html/forum/db/postgres7.php on line 79
phpBB : Critical Error

Could not connect to the database "

It started this error when i upgraded the server to fedora core 1 with postgres 4.3.3. Before it didn't give any errors.


Can anyone help me?!


My forum page http://www.iseg.utl.pt/forum


thank you

Posted: Tue Dec 30, 2003 11:51 am
by Stefan Koopmanschap
it sounds like a problem with the postgres installation that does not allow any links (?)

you might want to check the postgres configuration and documentation.

Posted: Thu Jan 01, 2004 3:24 am
by R45
Check your maximum connection setting in your postgresql.conf file. I assume you mean PostgreSQL 7.4?

Didn't work

Posted: Sun Jan 04, 2004 3:18 am
by armindo
:(

Re: Didn't work

Posted: Mon Jan 05, 2004 12:06 am
by R45
armindo wrote: :(

Why :( ? I answered you.

Posted: Mon Jan 05, 2004 1:38 am
by A_Jelly_Doughnut
The post subject "didn't work" ;)

Posted: Mon Jan 05, 2004 2:16 am
by R45
Ah sorry, missed that

Looking at the C source for the postgresql extension

Code: Select all

 			if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) {
 				php_error_docref(NULL TSRMLS_CC, E_WARNING,
-								 "Cannot create new link. Too many open links (%ld).", PGG(num_links));
+								 "Cannot create new link. Too many open links (%ld)", PGG(num_links));
 				goto err;
 			}
What is your pgsql.max_links setting in your php.ini file? By default it's -1, which is unlimited. Check that, adjust it to -1 if need then restart your webserver.

although it isn't working yet thank u for all support

Posted: Mon Jan 05, 2004 12:02 pm
by armindo
It already -1 (unlimited). That's the wierd part


So i'm still offline... and without ideas

Posted: Mon Jan 05, 2004 1:17 pm
by R45
Hmm, try changing it to a positive value then. Try 10 and see.

Working

Posted: Mon Jan 05, 2004 5:53 pm
by armindo
The !"##%$&/)/)(/=&&$ upgrade left my old PHP.INI file the fucking problem was a question of overwriting the php.ini with the new one.....


Man i feel so stupid.... Sorry guys and once again THANK U!!!!

Posted: Fri Apr 30, 2004 6:46 pm
by HySpeed
I get the same error.
I just upgraded the sytem from Red Hat to Fedora.
During the upgrade I got a message that the database could not be migrated,
so I renamed the folder and started all over.

I've created the postgreSQL database and checked the php.ini file, the value is set to -1.

Any ideas?

thanks

Posted: Fri Apr 30, 2004 6:55 pm
by R45
HySpeed wrote: I get the same error.
I just upgraded the sytem from Red Hat to Fedora.
During the upgrade I got a message that the database could not be migrated,
so I renamed the folder and started all over.

I've created the postgreSQL database and checked the php.ini file, the value is set to -1.

Any ideas?

thanks

Replace your php.ini with a new one from the PHP distribution. That usually cures it. This is a problem with redhat leaving old php.ini files intact.

Posted: Fri Apr 30, 2004 9:09 pm
by HySpeed
Thanks.

My friend looked at it and determined that he only needed to comment out the "extensions=" lines in php.ini and restart the daemon.

Yippee!