HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_366
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 366 Step 4 Pre-configure Apache for PHP4’s configure step If you want to use and include PHP4 server-side scripting language support to your  Apache web server then, move into the new Apache source directory (cd apache_1.3.12/) if you are not already in and type the following commands on your terminal: CC="egcs" \ OPTIM="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame- pointer -fno-exceptions" \ CFLAGS="-DDYNAMIC_MODULE_LIMIT=0" \ ./configure \ --prefix=/home/httpd \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --libexecdir=/usr/lib/apache \ --includedir=/usr/include/apache \ --sysconfdir=/etc/httpd/conf \ --localstatedir=/var \ --runtimedir=/var/run \ --logfiledir=/var/log/httpd \ --datadir=/home/httpd \ --proxycachedir=/var/cache/httpd \ --mandir=/usr/man NOTE: This step is necessary only if you want to include PHP4 support to your Apache source code since it’ll pre-configure Apache for PHP4’s configure step bellow. Take a note that the “- DDYNAMIC_MODULE_LIMIT=0” option will disable the use of dynamically loaded modules in our compilation of Apache and will improve its performance. Configure PHP4 and apply it to the Apache source tree Now, move into the new php4 directory (cd ../php-4.0) and type the following commands on your terminal: 1)      Edit the php_pgsql.h file (vi +46 ext/pgsql/php_pgsql.h) and change the lines: #include <libpq-fe.h> #include <libpq/libpq-fs.h> To read: #include </usr/include/pgsql/libpq-fe.h> #include </usr/include/pgsql/libpq/libpq-fs.h> These modifications in the “php_pgsql.h” file are necessary to indicate the location of our “libpq- fe.h”, and “libpq-fs.h” header files of PostgreSQL database during configuration time of PHP4. 2)     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 \ (if you want IMAP & POP support). --with-ldap \ (if you want LDAP database light directory support).