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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: saverio at mystere dot sci dot sns dot it
New email:
PHP Version: OS:

 

 [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: Fri Nov 22 04:01:26 2019 UTC