Like mod_perl, mod_php is a very large package. PHP is a complete
scripting language, with various capabilities. To run PHP with your Web
server, you'll need to edit the httpd.conf file.
In your httpd.conf file, you need to uncomment the
LoadModule and AddModule lines for
the version or versions of PHP that you installed.
After the main LoadModule section, there's a list of
six additional modules. If you installed the PHP/FI package (version
2.01), uncomment the php_module line so that instead
of:
#LoadModule php_module modules/mod_php.so
|
It reads:
LoadModule php_module modules/mod_php.so
|
If you installed the PHP3 package, uncomment the following line instead:
#LoadModule php3_module modules/libphp3.so
|
If you installed both the PHP/FI package and the PHP3 package, uncomment
both of the previous lines.
After the main AddModule section, there's another
list of six additional modules.
If you installed the PHP/FI package, uncomment the
mod_php.c line so that instead of:
It reads:
If you installed the PHP3 package, uncomment the
mod_php3.c line so that instead of:
It reads:
If you installed both packages, uncomment both lines.
The AddType application/x-httpd-php ..php3 and/or the
AddType application/x-httpd-php3 .php3 and
AddType application/x-httpd-php3-source .phps lines
are in <AddModule mod_php.c> tags or <AddModule mom_php3.c>
tags, so that the correct types are automatically invoked if you have
one of both of the PHP modules are compiled in to Apache. So if you've
compiled in the PHP/FI module, the PHP/FI types are enabled
automatically. If you've compiled in the PHP3 module, the PHP3 types are
enabled automatically.
Save your httpd.conf file, and then re-start
Apache. You should now be running mod_php.
Please refer to the PHP web site at http://www.php.net/ for more
information about configuring, testing and using PHP.