Answered by the Webhosting Experts

Upgrade PHP4 to PHP5 in Direct Admin control panel

SSH to server as root and then perform the following:

https://www.directadmin.com/forum/showthread.php?s=&threadid=5663&highlight=php5

* Compile the PHP 5 lib for Apache *

– Download php to a temporary directory (https://www.php.net/downloads.php)
– cd [the temporary directory]
– tar zxvf php-5.0.x.tar.gz
– cd php-5.0.x
– /usr/local/directadmin/customapache/configure.php ( _ap2 for Apache2)
– make
– make install

* This was the install procedure * (Check if /usr/lib/apache/libphp5.so exists)

You can copy the php-dist.ini to /usr/local/lib/php.ini and edit for Register Globals on etc. (OR JUST USE THE OLD ONE IF YOU DON’T KNOW WHAT TO CHANGE )

* Configure you’re apache (2) *

– vi /etc/httpd/conf/httpd.conf

** On my machine the httpd conf is already altered:

#
# Dynamic Shared Object (DSO) Support
#
LoadModule php4_module /usr/lib/apache/libphp4.so
LoadModule frontpage_module /usr/lib/apache/mod_frontpage.so
LoadModule perl_module /usr/lib/apache/mod_perl.so
LoadModule php5_module /usr/lib/apache/libphp5.so

** QUOTE OUT THE LoadModule php4_module:

#
# Dynamic Shared Object (DSO) Support
#
#LoadModule php4_module /usr/lib/apache/libphp4.so
LoadModule frontpage_module /usr/lib/apache/mod_frontpage.so
LoadModule perl_module /usr/lib/apache/mod_perl.so
LoadModule php5_module /usr/lib/apache/libphp5.so

Restart apache And all should work GREAT!

If it doesn’t work, UNQUOTE the LoadModule php4_module and QUOTE the LoadModule php5_module and restart apache

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.