Experience of crazy installation of php4 on 3 platforms
Author: Gu Yue Qingjian Excerpt date: June 5, 2001
This is the simplest and most efficient, get php4 and The source code of apache1.3.12. In the form of tar.gz.
Complete as root:
#tar -zxvf apache_1.3.12.tar.gz
#cd apache_1.3.12
#./configure --prefix=/apache
#mkdir /apache
#cd ..
#tar -zxvf php-4.0.0.tar.gz
#cd php-4.0.0
#./configure --with-apache=../apache_1 .3.12 --enable-track-vars --with-mysql --disable-debug
#make
#make install
#cd ../apache_1.3.12
#./configure -- prefix=/apache --activate-module=src/modules/php4/libphp4.a
#make
#make install
#mv /usr/bin/httpd /usr/bin/httpd.old
#ln -s /apache/bin/httpd /usr/bin/httpd
#vi /apache/conf/httpd.conf
Remove the # in front of AddType application/x-httpd-php .php
#/apache/bin/apachestl restart
#####Windows NT /2000
Using the ISAPI interface of IIS4/5 will be very efficient
NT4.0Server needs to install Option pack 1
Download the binary winzip version of PHP4 and unpack it to a directory,
For example, c:php
The following assumes that NT/2000 is installed in c:winnt
c:>copy c:phpphp.ini-dist c:winntphp.ini
c:>copy c:phpPHP4TS.DLL c:winntsystem32
Return to the graphical environment and start the iis manager
Right-click on the web site icon and select "Properties" "ISAPI Filtering" "
Add a new filter, the name is php
The path is: c:phpphp4isapi.dll
Open the "Home Directory Properties" of the corresponding web site
Press the "Configure" button, Select "Application Mapping"
Add .php extension, the executable file uses
c:phpphp4isapi.dll
Restart IIS.
#####Windows 98
It is not recommended to use PWS because it requires modifying the registry.
You can use Apache 1.3.12 for Win32
Download and install the W32 version of apache1.3.12
The default installation directory is
C:Program FilesApache GroupApache
Download and install the win32 version of php4.0.0
Unzip to c:php
Assume the windows installation directory is c:windows
copy c:phpphp.ini-dist c:windows
copy c:phpPHP4TS.DLL c:windowssystem
edit
C :Program FilesApache GroupApacheconfhttpd.conf
Add the following three lines
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd- php "/php/php.exe"
It is best to add it to a place with a lot of addtypes
Start apache from the start menu