Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

How do I 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

Share on Twitter
Share on Facebook