PHP Installation. (by ryza www.deluxnetwork.com)
----------------------------------------
im presuming you already have apache 1.3.27 installed at /usr/local/apache.
if you havent then GO HERE and do it. once you done that come back to this page.
[root@server root]# cd /root
[root@server root]# mkdir files
[root@server root]# cd files
[root@server root]# wget http://www.deluxnetwork.com/downloads/unix/php-4.3.2RC2.tar.gz
[root@server root]# tar xzvf php-4.3.2RC2.tar.gz
[root@server root]# cd php-4.3.2RC2
The grey text below is optional, only include that if you have installed MySQL already!,
if you want to install MySQL before proceeding then GO HERE.
FOR APACHE 1.3.x:
[root@server root]# ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-memory-limit=yes --enable-debug=no --enable-track-vars --enable-ftp
Use the configure line below if you require more features.
[root@server root]# ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-mysql --enable-memory-limit=yes --enable-debug=no --enable-track-vars --enable-ftp --enable-calendar --with-zlib --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-tiff-dir=/usr/local --with-xml --enable-wddx --with-xmlrpc --enable-gd-native-ttf --with-ttf --enable-exif --with-freetype-dir=/usr/local
FOR APACHE 2.x:
[root@server root]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-memory-limit=yes --enable-debug=no --enable-track-vars --enable-ftp
if you get "lex" Error
you need to install: flex
[root@server root]# make
[root@server root]# make install
[root@server root]# cp -rf php.ini-dist /usr/local/php/lib/php.ini
[root@server root]# ln -s /usr/local/php/bin/php /sbin/php
Add the following line in /usr/local/apache/conf/httpd.conf (this usually automatically gets done)
LoadModule php4_module modules/libphp4.so
Also Add this line (make sure you do this or php will NOT WORK)
AddType application/x-httpd-php .php
There is special sections in the httpd.conf file for each of these lines,
look for the sections that contain LoadMdoule(near the top) and AddType(near the bottom).
Now you need to restart apache
[root@server root]# /usr/local/apache/bin/apachectl restart
Uninstalling PHP
----------------------------------------
[root@server root]# rm -rf /usr/local/php
[root@server root]# rm -rf /sbin/php
|