Re: Help with PHP Shell Scripting

From: Date: Fri, 19 Jan 2001 08:37:04 +0000
Subject: Re: Help with PHP Shell Scripting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35594@lists.php.net to get a copy of this message
Hello Justin, (JY == "Justin Yu") Justin.Yu@ec.gc.ca 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.

« previous php.general (#35594) next »