Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to get multiple PHP versions working on a cPanel server which was compiled with mod_fcgid and PHP 5.3.

Below is the PHP config generated by cPanel.

AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php5
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php4
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php3
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php2
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .phtml

I did compiled PHP 5.2 from source and placed it's files under /usr/local/php52 then created a wrapper as below;

#!/bin/sh

exec /usr/local/php52/bin/php-cgi

Then added the below to Apache's PHP configuration file.

AddHandler fcgid-script-php52 .php52
FCGIWrapper /usr/local/cpanel/cgi-sys/php52 .php52

I am not sure if this is the correct approach for this. Now what I wonder is how I can have a specific account to utilize this wrapper instead of default one?

share|improve this question
add comment

1 Answer

Your wrapper is looking good as you have compiled the php52 at /usr/local/php52/. make sure that its executable.

chmod a+x file

Also its ownership. use the chown command to do that. Its better for you to go through the following link to get the complete steps to use the mod_fcgid

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.