postgresql+php+double choco latte

From: Date: Wed, 01 Nov 2000 13:09:47 +0000
Subject: postgresql+php+double choco latte
Groups: php.db 
Request: Send a blank email to php-db+get-4102@lists.php.net to get a copy of this message
I would like to know if anyone can give me any help or point me in the direction of it over a problem I'm having with postgresql php and double choco latte. I'm not sure where to start for help so I'm starting here. I'm using php 4.0.0 ( and have had the problem with php 4.0.3pl1 as well ) from source, postgresql 7.0.2 from rpm and dcl-20000905.tar.gz I've setup postgresql php and dcl according to instructions from both dcl and php README or INSTALL files ( yes I've poked around in the rest of the documentation with no luck ) I succesfully setup postgresql and php for dcl. I'm then supposed to login to dcl through netscape with user and password sa to continue configuration of dcl. It's at this point that I run into a problem. PHP gives me the error below: ___________________________________________________________ Fatal error: Call to undefined function: pg_connect() in pgsql.php3 on line 60 A small chunk from that file is as follows: ___________________________________________________________ function Connect($conn = "") { if ($conn == "") { if (!IsSet($GLOBALS["__DB_CONN__"])) { if (IsSet($GLOBALS["dbPassword"]) && $GLOBALS["dbPassword"] != "") $this->conn = pg_connect(sprintf("dbname=%s port=%s host=%s user=%s password=%s", $GLOBALS["dbName"], $GLOBALS["dbPort"], $GLOBALS["dbHost"], $GLOBALS["dbUser"], $GLOBALS["dbPassword"])); else ( This is line 60 ) $this->conn = pg_connect($GLOBALS["dbHost"], $GLOBALS["dbPort"], "", $GLOBALS["dbName"]); $GLOBALS["__DB_CONN__"] = $this->conn; } else $this->conn = $GLOBALS["__DB_CONN__"]; } else $this->conn = $conn; return $this->conn; _______________________________________________________________ Now I looked on the php website and came across the information at this url: http://php.net/manual/html/function.pg-connect.html Which states that the syntax for pg_connect has been deprecated. So what I'm thinking is that the syntax above in both conditions ( there are two seperate database connect calls which are tried as near as I can tell ) is no longer supported yet the url I gave above doesn't make it very clear what the syntax has been replaced with. But still the error mentioned earlier states that the call is undefined meaning that it's not even aware of a pg_connect funtion call. I would appriciate what ever help anyone can provide be it pointing me to the documentation which talks about how to define function call's within php or pointing me to some other source of help. Thanks in advance and if I've broken any netiquette rules by including the above tidbit of source I'm sorry.

« previous php.db (#4102) next »