|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #178 Postgres suddenly stopped working (unsupported pg_connect)
Submitted: 1998-03-16 05:14 UTC Modified: 1998-05-15 20:50 UTC
From: saverio at mystere dot sci dot sns dot it Assigned: zeev (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 3.0b3 OS: Solaris 2.5.6
Private report: No CVE-ID: None
 [1998-03-16 05:14 UTC] saverio at mystere dot sci dot sns dot it
After about 15 days of uptime, postgres simply stopped 
working, and php gaver this error message: 

> Call to unsupported or undefined function pg_connect() 
> in ...

Posgres remained perfectly usable from other programs.
Killing and restarting the HTTPD server solved the problem.

My configuration:
 --with-apache=/home/saverio/vurt/tgz/apache_1.3b3 --with-pgsql=/o

And the obligatory script that caused the problem:

$conn = pg_Connect("localhost", "5432", "", "", "postgres");
 if (!$conn) 
      echo "An error occured: database down\n"; 

I haven't been able to reproduce the bug so far.. anybody had similar


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-15 20:50 UTC] zeev
I don't have an answer for you, but one thing to note is that if you use "localhost" then it
will use a TCP socket to connect to your backend server.  If you just specify an empty string ""
then it will use a Unix domain socket and it should be faster and perhaps more reliable.


A lot of water went to lots of different places through
a lot of different rivers since beta 3.  There were quite
a few memory corrupting bugs that may have caused this
under some circumstances.  Since the bug is entirely
unreproduceable and only occured once after days and days
of uptime, I'm closing it now.
If the bug still occurs with a recent release,
please let us know.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue May 30 02:03:44 2023 UTC