|
[ Getting
Started ] [ Server
Help ] [ Add
on Help ] [ Solution
] [ Trouble Shooting ]
PLEASE NOTE, THIS IS VERY OLD ARCHIVE
INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS
Installing PHP4 There are two different ways
to install PHP4 on a Virtual Server. The best
way is to install it as a Dynamic Module. It can
also be installed as a CGI to which PHP4 files are redirected by your Virtual
Server web server.
Dynamic Module Installation Connect to your
Virtual Server via Telnet
or SSH and do the following.
- Upgrade Your Virtual
Server Apache (if you aren't already running Apache 1.3).
- Install the PHP4 dynamic modules on your Virtual Server.
FreeBSD PHP 4.1.2
% vinstall php4-dso
The dynamic module PHP4 installation does not include a PHP configuration
file (php.ini). Only the CGI installation (below) includes the
configuration file.
- Add the following line to the top of your Virtual Server web server
configuration file (~/www/conf/httpd.conf) to dynamically load the PHP4
dynamic module. Substitute the name of the dynamic module you want to install
for
MODULE-NAME.
LoadModule php4_module modules/MODULE-NAME
This tends to work for most applications:
LoadModule php4_module modules/mod_php4-4.1.2-module-mysql-mcrypt-ftp-zlib-imap-freetype-curl-gd-dom.so
php_admin_value file_uploads off Please note: php_admin_value file_uploads off A recent security notice went out concerning this. You should include this line just under
the module you wish to install, no matter which one you install.
These PHP4 modules are available:
No database support
mod_php4-4.1.2-module.so
mod_php4-4.1.2-module-ftp-imap-freetype-gd.so
mod_php4-4.1.2-module-imap.so
mod_php4-4.1.2-module-mcrypt-freetype-gd.so
mod_php4-4.1.2-module-mcrypt-ftp-imap-zlib-freetype-gd-curl-dom.so
mod_php4-4.1.2-module-mcrypt-ftp-imap.so
MySQL database support
mod_php4-4.1.2-module-mysql-ftp-imap-freetype-gd.so
mod_php4-4.1.2-module-mysql-imap.so
mod_php4-4.1.2-module-mysql-mcrypt-freetype-gd.so
mod_php4-4.1.2-module-mysql-mcrypt-ftp-imap.so
mod_php4-4.1.2-module-mysql-mcrypt-ftp-zlib-imap-freetype-curl-gd-dom.so
mod_php4-4.1.2-module-mysql.so
- Make the following additions and modifications to your Virtual Server web
server configuration file (~/www/conf/httpd.conf).
| NOTE: If your
Virtual Server was configured before Dec 8, 1998 you will need to make the
following additions and modifications in the ~/www/conf/srm.conf file
instead. Then, Restart
Your Virtual Server Web Server.
|
- Modify the
DirectoryIndex line so that PHP4 files will be
included as directory indices.
DirectoryIndex index.html index.htm index.php index.cgi
- Add the following lines so that all files with .php, .php3,
.php4, and .phtml extensions will be redirected to the PHP4
dynamic module.
AddType application/x-httpd-php .php .php3 .php4
AddType application/x-httpd-php-source .phps
If you want to run PHP3 and PHP4 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
CGI Redirect Installation Connect to your
Virtual Server via Telnet
or SSH and do the following.
- Install the PHP4 software. Use the commands below, depending upon your
Virtual Server O/S to install the basic build of PHP4.
FreeBSD PHP 4.0.0
% vinstall php4
A number of PHP4 CGI are builds available. To install a build with
features that you want, use one of the following commands, instead of
those above.
FreeBSD PHP 4.1.2
% vinstall php4
% vinstall php4-mysql
The PHP4 configuration file will be created at ~/usr/local/lib/php.ini
instead of ~/usr/local/lib/php3.ini as it was with previous versions of
PHP3.
- Due to Security
Issues the PHP4 CGI is installed at ~/usr/local/bin/php. Do the
following to link the PHP4 CGI into your ~/www/cgi-bin directory.
% cd ~/www/cgi-bin
% ln ../../../bin/php php
- Make the following additions and modifications to your Virtual Server web
server configuration file (~/www/conf/httpd.conf).
- Modify the
DirectoryIndex line so that PHP4 files will be
included as directory indices.
DirectoryIndex index.html index.htm index.php index.cgi
- Add the following lines so that all files with .php, .php3,
.php4, and .phtml extensions will be redirected to the PHP4 CGI
executable.
Action php4-script /cgi-bin/php
AddHandler php4-script .php .php3 .php4 .phtml
PLEASE NOTE, THIS IS OLD ARCHIVE
INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS
|