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 couldnt be found, provide the full path to the folder in which the appropriate les can be
found. For example, our congure command found the path to mysql. If it hadnt we would have
provided the full path to mysql as part of the command to run the congure script.
Other Congure Options
There are many more command line arguments that you can use as well. For example, type in the
command
./configure --help
and youll 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 le recommends starting with just two commands:
with-mysql and with-apxs. Run the congure script like this for quick installation:
./configure --with-mysql --with-apxs2
You need to use with-apxs2 rather than with-apxs because youre 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, youll see that it does
quite a few such checks as it gets ready for the make command.
After the congure 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 le. The Location bar on the screen in Figure 1-8 shows that the
main panels contents are in the php directory.
Running Additional Congure Options
You may use some of the other options of the congure script to compile PHP5 with
enable_track_vars, with-gd, and with_pgsql. But if youd like to use the congure 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 congure script with the with-apache or
with-apxs2 options. Its compiled as a CGI executable binary le if you used the congure 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