Does anyone know how I can allow customers on a WHM server to run a php version of their choice.
For example some prefer v5.2.16 and others v5.3.x
So, can I allow people to have a different versions depending on their preference?
Printable View
Does anyone know how I can allow customers on a WHM server to run a php version of their choice.
For example some prefer v5.2.16 and others v5.3.x
So, can I allow people to have a different versions depending on their preference?
Compile php cgi for both the version and add the following in .htacess for individual users.
AddHandler php-script .php
Action php-script /usr/bin/php5.2
or
Action php-script /usr/bin/php5.3
Thanks man,
the server is currently running v5.6.12 and was installed via EasyApache.
Can you guide me on how I can install v5.3.4 so that I don't mess up the earlier version?
You need manyally compile v5.3.4 and manyally enable php-cgi file in some Virtualhosts.
For example create /usr/php53
Fetch php source from http://php.net/ and extract
./configure --prefix=/usr/php53
make
make install
And after you will have php-cgi executable file in /usr/php53/bin/php-cgi
Use it for some sites in you httpd.conf
Ok, Ive now installed v5.3.5 from source like you said, and the install went through fine but I got a message saying:
"Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it."
Is this something I should be worried about?
Also, you mentioned changing the httpd.conf file, but what do I change?
I thought I was supposed to change the .htaccess file for each user, or do I have to do both?
Anybody????
Do not worry about PEAR.
You need crete link with php to your site
ln /usr/php53/bin/php-cgi ~/site.com/cgi/php-cgi
And .htaccess for site must be
AddHandler php-cgi .php5 .php
Action php-cgi /cgi-bin/php-cgi
When I place the .htaccess file in the root folder or the public_html folder, I get an internal server error message when I try to access phpinfo page, and an additional 404 error message.