Datasheet
P1: KTX
WY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44
Getting Up and Running
For your quick install use only –with-mysql and –with-apxs2. If you get any error messages telling
you something couldn’t be found, provide the full path to the folder in which the appropriate files can be
found. For example, our configure command found the path to mysql. If it hadn’t we would have
provided the full path to mysql as part of the command to run the configure script.
Other Configure Options
There are many more command line arguments that you can use as well. For example, type in the
command
./configure --help
and you’ll see the complete range of arguments that you can use, along with their descriptions.
Performing the QUICK INSTALL (DSO)
The quick installation in the PHP INSTALL text file recommends starting with just two commands:
–with-mysql and –with-apxs. Run the configure script like this for quick installation:
./configure --with-mysql --with-apxs2
You need to use –with-apxs2 rather than –with-apxs because you’re running a later version of
Apache. The script actually came back and informed me of this when it ran, which was very helpful. If
you read through the commands that appear in your terminal as the script runs, you’ll see that it does
quite a few such checks as it gets ready for the make command.
After the configure script has run, you need to enter two more commands:
make
make install
Install makes a directory in /user/local/lib named php where it places a copy of PEAR (php Extension
Add-on Repository) and the php.ini file. The Location bar on the screen in Figure 1-8 shows that the
main panel’s contents are in the php directory.
Running Additional Configure Options
You may use some of the other options of the configure script to compile PHP5 with
enable_track_vars, with-gd, and with_pgsql. But if you’d like to use the configure options for gd
(the graphics module) and pgsql (the database) you must make sure these programs are also loaded for
everything to work properly, and you must provide the full path to the installations as required.
Running as a CGI
PHP5 is compiled as a module if you used the configure script with the –with-apache or
—with-apxs2 options. It’s compiled as a CGI executable binary file if you used the configure script
without any reference to Apache or apxs. And if you compiled PHP5 as a CGI, then when you installed
PHP5, it most likely put the actual binary in /usr/local/bin. Copy the CGI executable binary to your
cgi-bin directory using:
cp /usr/local/bin/php /usr/local/apache/cgi-bin/php.cgi
This enables Apache users to run different PHP-enabled pages under different user-ids. However, CERT
advisory CA-96.11 recommends against placing any interpreters (such as PHP5) into cgi-bin because
15