Thursday, August 9, 2007

PHP4 installation on apache2 (require root permission)

Download the php binary distribution from php site and execute the following commands in the same order

$gzip -d php-4.4.4.tar.gz
$tar -xvf php-4.4.4.tar
$cd php-4.4.4
$./configure --with-apxs2=/portal/apache0/bin/apxs --with-config-file-path=/portal/apache0/conf
$make
$make install
$cp php.ini-dist /portal/apache0/conf/php.ini

edit httpd.conf and add below lines
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

restart apache

No comments: