PHP Install

The PHP modules are essentially part of Apache and must be built into any newly installed or rebuilt version of Apache, whenever it is built. Download the latest PHP tar file from http://www.php.net/downloads.php and untar it in the top level source directory (e.g. /rpm/Apache):

     tar -xvzf php-a.b.yy.tar.gz

Nota bene: If you are going to be running PHPMyTicket, it does not work with version 5 of PHP. Consequently, you will need a 4.x version of PHP instead, to make this package work. Unfortunately, support for PHP 4 ceased as of 2007 Dec 31 so this may no longer be a viable option for you.

Tar will create a new directory for that version of PHP. Switch to that directory and build PHP:

     cd php-a.b.yy
     ./configure --with-apxs2=/usr/share/httpd-m.n/bin/apxs --with-gd \
                 --with-ldap --with-libxml-dir=/usr/local --enable-bcmath \
                 --with-mcrypt --with-mysql=/usr/local/mysql \
                 --with-unixODBC=/usr/local/unixODBC
     make

The install directory is the same as the Apache install directory chosen above and is given by "--with-apxs2". The other, architecture-independant components of PHP will be installed in /usr/local unless "--prefix=" is used. Basically, what this means is that they will be installed in /usr/local/lib/php, which is usually a good choice so there is no need to change the prefix. The other options turn on or off features that are used. The "--with-unixODBC" option must point to the directory where unixODBC was installed. The "--with-gd" option may need to point to "/usr/local" (i.e. "--with-gd=/usr/local") if GD was installed there instead of "/usr".

Switch to super-duper user and install PHP:

     su
     make install

You may also want to add this symlink, since many programs expect to find PHP at this location:

     ln -s /usr/local/bin/php /usr/bin/php

Note that, if you make any changes to configuration parameters passed to "configure", you should do a "make clean" before running "configure" again and compiling any of these components. Otherwise, your parameters might not take effect.