Re: PHP/PearDB works on commandline but not via http....

From: Date: Wed, 18 Aug 2004 20:55:02 +0000
Subject: Re: PHP/PearDB works on commandline but not via http....
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-194187@lists.php.net to get a copy of this message
> On Wed, 18 Aug 2004 12:53:25 -0700, pw <p.willis@telus.net> wrote: >> Hello, >> >> I have an interesting problem with PostgreSQL >> via PearDB and PHP 4.3.3 . >> >> I have a php page that opens a remote connection >> to a Postgres database, performs a query, lists >> the results and then closes the connection. >> >> If I run the php from the command line the >> connection and query work fine. Php dumps >> a nice web page with all the data that I am asking for. >> >> If I serve the same php page via apache >> from the same machine, php fails to open >> the database connection and thus the page >> fails to fill out. PearDB is installed and working >> since >> >> if(DB::iserror($db)) >> >> detects the error. >> >> Anyone have any ideas? >> > > Can't help you unless you give us an error... > And check to see that PostgreSQL is accepting network connections rather than localhost. Is it listening to a port? -- --Matthew Sims --<http://killermookie.org>

« previous php.general (#194187) next »