Re: Problem connecting to Postgres
| From: | Michal Migurski | Date: | Mon, 23 Aug 2004 16:23:30 +0000 |
| Subject: | Re: Problem connecting to Postgres | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194490@lists.php.net to get a copy of this message | ||
> I am a newby having a configuration problem. I am using PHP 4.3.6 and
> postgres 7.4.3
>
> The problem is when I try to execute my php scripts that connect to
> postgres from the command line I get error like this:
>
> Fatal error: Call to undefined function: pg_connect() in
> /Users/jcapy2/Sites/Jesper/SyncPosgresToMbrMaxData
> .php on line 28
>
> But it works fine from a browser using apache.
The version of PHP used by Apache may not necessarily have been configured
the same way as the one you're using on the command line. Try phpinfo() to
determine what's there, and recompile/reinstall if you're lacking PG
support. Or, try to find the command line instance that corresponds to the
apache module you're using.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html