Install PHP4 on CentOS 5.5 VPS

1. Install Apache

yum install httpd

2. Install Mysql

yum install mysql mysql-server php-mysql

3. Install dependencies

yum install flex gcc* bison bison-devel httpd-devel make

4. Download PHP4 cource


5. Extract PHP4

tar zxvf php-4.4.9.tar.gz

6. Enter folder and configure

cd php-4.4.9
./configure --with-apxs2=/usr/sbin/apxs

7. Install and verify

make test

8. Finalise installation

make install

9. Add configuration to php.conf

nano /etc/httpd/conf.d/php.conf

add this to the file and save the file

# /etc/httpd/conf.d/php.conf
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages
LoadModule php4_module modules/
# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php-script .php
AddType text/html .php
# Add index.php to the list of files that will be served as directory
# indexes.
DirectoryIndex index.php
# Uncommenting the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#AddType application/x-httpd-php-source .phps

10. Restart Apache

service httpd restart


  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

Can I increase my VPS plan without upgrade my package?

No. The only way you increase your RAM is to upgrade the currect package to a higher package. We...

Where is the datacenter VPS located?

Windows VPS is located at Colo4Dallas Taxes US BlueSquare UK Linux VPS is...

What is the URL to virtuozzo


Yum update errors - Invalid boolean

This is the error when doing yum update ---Options Error: Error parsing 'gpgcheck': invalid...

Change default server page on DirectAdmin server

Replace index file in this location /var/www/html/

Powered by WHMCompleteSolution