Hello Justin, 

(JY == "Justin Yu") [EMAIL PROTECTED] writes:

JY> When I tried connecting to Postgres through a shell script that I
JY> wrote, I get the following error:

JY> "Fatal error: Call to undefined function: pg_connect()"

Because you don't have pgsql (PostgreSQL) support built into your
version of PHP. But you know that by now.

JY> After searching the web for a solution, I realized that I have to
JY> compile PHP into its CGI version. Currently, PHP is installed as
JY> an Apache module on my machine.

Either a CGI or a DSO can have pgsql support. You just have to build
it that way.

JY> So, I tried to compile PHP by doing the following in the
JY> /usr/local/php-4.0RC1
JY> directory where the source files for PHP4.0RC1 are located:

JY> ./configure -with-pgsql
JY> make

<snip>

Try the snapshot at:

http://snaps.php.net/php4-latest.tar.gz

Make sure you have a good installation of PostgreSQL from:

http://www.postgresql.org/software.html

Configure:

./configure --with-pgsql=/path/to/postgresql/base

You may want --enable-force-cgi-redirect, you decide
(http://www.php.net/manual/en/html/security.html#security.cgi)

Then see if it builds correctly.

JY> Justin

-Brian
--
Every program is a part of some other program and rarely fits.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to