Now, move into the new php4 directory cd ../php-4.0 and type the following commands on your terminal:
Edit the
php_pgsql.hfile, viext/pgsql/php_pgsql.hand change the lines:#includelibpq-fe.h#includelibpq/libpq-fs.hTo read:
#include/usr/include/pgsql/libpq-fe.h#include/usr/include/pgsql/libpq/libpq-fs.hThese modifications in the
php_pgsql.hfile are necessary to indicate the location of ourlibpq-fe.h, andlibpq-fs.hheader files of PostgreSQL database during configure of PHP4. In Red Hat Linux, the libraries of PostgreSQL are located under/usr/include/pgsql.Now, we must configure and install PHP4 in the Linux server:
CC="egcs" \ CFLAGS="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions -I/usr/include/openssl" \ ./configure \ --prefix=/usr \ --with-exec-dir=/usr/bin \ --with-apache=../apache_1.3.12 \ --with-config-file-path=/etc/httpd \ --disable-debug \ --enable-safe-mode \ --with-imap \
--with-ldap \
--with-pgsql \
--with-mm \
--enable-inline-optimization \
--with-gnu-ld \
--enable-memory-limit
If you want IMAP & POP support.
If you want LDAP database light directory support.
if you want PostgreSQL database support.
This tells PHP4 to set itself up for this particular hardware setup with:
Compile without debugging symbols.
Enable safe mode by default.
Include IMAP & POP support.
Include LDAP directory support.
Include PostgresSQL database support.
Include mm support to improve performance of Memory Library.
Enable inline-optimization for better performance.
Compile with memory limit support.
Assume the C compiler uses GNU ld.
[root@deep ]/php-4.0# make [root@deep ]/php-4.0# make install