See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Multiple PHP Versions / cPanel with mod_fcgid

General Tech Bugs & Fixes
Max. 2000 characters

Sam Curran


( 7 months ago )


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;


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?

what's your interest