Categories

Monday 18 June 2012

How to create custom php.ini for servers having fastcgi

Hello,

Open .htaccess file of the user and add the following as below
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.fcgi  


Move to the cgi-bin folder of the account


cp /usr/local/lib/php.ini /home/user/public_html/cgi-bin/

chown user: /home/user/public_html/cgi-bin/php.ini

chmod 755 /home/user/public_html/cgi-bin/php.ini

cd /home/user/public_html/cgi-bin/


vi php5.fcgi (insert the below codes and save)

#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5

chown user: /home/user/public_html/cgi-bin/php5.fcgi

chmod 755 /home/user/public_html/cgi-bin/php5.fcgi

No comments:

Post a Comment

Ad