



 
 
 
 
 
 
 
 
 
 
|
Installing
PHP 4 as a
Dynamic Module
There are two different ways to install PHP
4 on a Virtual Server. The best way is to install it as a Dynamic
Module. It can also be installed
as a CGI Redirect to which PHP files are redirected by the web server.
Dynamic Module Installation
Connect to your Virtual Server via Telnet
or SSH and do the following:
- Install the PHP 4 dynamic modules on your Virtual Server.
- The installation should automatically add the following
line to the top of your Virtual Server web server configuration file
(~/www/conf/httpd.conf)
to dynamically load the PHP 4 dynamic module. Check to see that it is
there.
LoadModule
php4_module modules/mod_php4-4.3.0.so
- Check to see that the following additions and modifications have been
made to your web server configuration file (~/www/conf/httpd.conf)
If they are not there, you will need to add it yourself.
- Modify the DirectoryIndex
line so that PHP 4 files will be included as directory indices.
DirectoryIndex index.php index.php4 index.php3 index.cgi index.html index.htm
- Add the following lines so that all files with .php,
.php3, .php4, and .phtml
extensions will be redirected to the PHP 4 dynamic module.
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
If you want to run PHP 3 and PHP 4 concurrently, add the following
lines instead of those above.
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php .php .php4
AddType application/x-httpd-php-source .phps
- Restart your web server:
% restart_apache
- To test your PHP installation, try creating the following ~/www/htdocs/test.php4
document and viewing it in your web browser.
<HTML>
<BODY>
<?php
phpinfo();
?>
</BODY>
</HTML>
|
|