

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
|
 |
 |
 |
PHP
PHP is a popular,
freely available web applications development tool.
The newest version, called PHP3, includes an HTML-embedded scripting
language and a server-side preprocessor that interprets the HTML-
embedded code in order to create dynamically generated web pages.
PHP3 includes support for various databases, including
mSQL,
MySQL, and
PostgreSQL. Thus, PHP is
commonly used for the development of database enabled web sites.
Like other preprocessed, html-embedded scripting languages, PHP has many
of the more useful features of Perl but is designed for HTML development
in mind. It eliminates the need for numerous small Perl CGI programs by
allowing you to place simple scripts directly in your HTML files. This
speeds up the overall performance of your web pages since the overhead of
forking Perl several times has been eliminated. It also makes it easier to
manage large web sites by placing all components of a web page in a single
html file. Similar tools commercially available include
Miva,
Aestiva HTML/OS, and
Meta-HTML PRO.
Installing PHP3 on your Virtual Server
There are two different ways to install PHP3 on a Virtual Server. The
best way is to install it as a dynamically loaded Apache module. It
can also be installed as a CGI to which PHP3 files are redirected
by the web server.
PHP3 Apache Module Installation
Configure your Apache web server to load the PHP3 module
and preprocess your HTML documents with PHP3 code.
- Add the following to the top of your web server configuration file (httpd.conf)
to dynamically load the PHP3 module:
No Database Support
LoadModule php3_module modules/mod_php3-module.so
- Add the following line to either the httpd.conf or srm.conf file so that all files
with .php3 extensions will be redirected to the PHP3 module:
AddType application/x-httpd-php3 .php3
PHP3 CGI Redirect Installation
Install the PHP3 CGI software and configure your web server to redirect
your HTML documents with PHP3 code to the CGI.
-
Telnet or SSH to your Virtual Server.
- Change to your home directory:
- Untar PHP3 software. Use ONE of the commands below,
depending upon the database support you want:
No Database Support
% tar xvf /usr/local/contrib/php-3.0.6-redirect.tar
mSQL Database Support
% tar xvf /usr/local/contrib/php-3.0.6-redirect-msql.tar
MySQL Database Support
% tar xvf /usr/local/contrib/php-3.0.6-redirect-mysql.tar
PostgreSQL Database Support
% tar xvf /usr/local/contrib/php-3.0.6-redirect-pgsql.tar
IMAP Support
% tar xvf /usr/local/contrib/php-3.0.6-redirect-imap.tar
- Add the following lines to either the httpd.conf or srm.conf file so that all files
with .php3 extensions will be redirected to the PHP3 CGI executable:
AddType application/x-httpd-php3 .php3
Action application/x-httpd-php3 /cgi-bin/php
|