php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 36 = ?
Subscribe to this entry?

 
 [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
pt/postgres


And the obligatory script that caused the problem:

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

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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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-2019 The PHP Group
All rights reserved.
Last updated: Thu Aug 22 13:01:27 2019 UTC