Howto: Enable FastCGI from Linux

To enable FastCGI from your Apache server, you may follow this article.

1. Copy the php.ini file to your cgi-bin folder.
2. Create a file named php.fcgi in the cgi-bin folder.
3. Insert the following script,

exec /usr/local/cpanel/cgi-sys/php5

4. Change the php.fcgi permission to 755.
5. Create/Edit the .htaccess file and insert the following script.

AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php.fcgi

cPanel: Configuring PHP and suEXEC from the Command Line

With cPanel, you do not need to recompile the whole easyapache to get your PHP or suEXEC to be run, you may easily get the PHP work with the rebuild_phpconf script to update the php.conf file.

To see a list of all options and arguments for the script, you may type the following from the command line,
/usr/local/cpanel/bin/rebuild_phpconf –help

If you wish to use PHP 5, CGI handler and enable suEXEC, you might type as,
/usr/local/cpanel/bin/rebuild_phpconf 5 cgi cgi 1

If you wish to use PHP 5, suPHP and enable suEXEC, you might type as
/usr/local/cpanel/bin/rebuild_phpconf 5 suphp suphp 1

The available PHP handler is as cgi, dso, none, fcgi and suphp.