How to install Custom PHP Version for suphp handler domains.
# cd /usr/src
# wget http://us.php.net/get/php-5.4.17.tar.gz
# tar -zvxf php-5.4.17.tar.gz
# cd php-5.4.17
To check the current PHP configuration option
# php -i | grep configure
Here I am using prefix as /usr/local/php-5.4.17
[ #./configure –prefix=/usr/local/php-5.4.17 –enable-cli –enable-cgi –with-curl –as per your requirements.
#make
#make install
Check the PHP Version
-bash-4.1# /usr/local/php-5.4.17/bin/php -v
PHP 5.4.17 (cli) (built: Jul 19 2013 00:45:34)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.
-bash-4.1#
Copy the main php.ini on the Custom php location, here it is /usr/local/php-5.4.17/lib
Check the current configuration file for Custom php.ini
-bash-4.1# /usr/local/php-5.4.17/bin/php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/php-5.4.17/lib
Loaded Configuration File => /usr/local/php-5.4.17/lib/php.ini
-bash-4.1#
Add the required PHP modules on extension directory. Here I have downloaded the ionCube and copy the .so module on ***20100525 directory
[IONLoader]
zend_extension=/usr/local/php-5.4.17/lib/php/extensions/no-debug-non-zts-20100525/ioncube_loader_lin_5.4.so
# vim /opt/suphp/etc/suphp.conf
[handlers]
application/x-httpd-php5.4=”php:/usr/local/php-5.4.17/bin/php-cgi”
# /usr/local/apache/conf/includes/pre_main_2.conf
Allow from All
### check the domain document root and set info page.
suPHP_AddHandler application/x-httpd-php5.4
AddType application/x-httpd-php5.4 .php
Also add the handler in the domain .htacess file.
/etc/rc.d/init.d/httpd configtest
/etc/rc.d/init.d/httpd restart
———————————>