Board index PHP Custom php.ini

Add custom php.ini for servers running FastCGI

Postby a24uall » Thu Feb 21, 2013 3:51 pm

Create a custom php.ini under the folder "cgi-bin" and alter the required php values
cd /home/USERNAME/public_html/cgi-bin/

vi php.ini

You need to give that file 755 permission to work.
chmod 755 php.ini


Create a file named "php5.fcgi" under "/home/USERNAME/public_html/cgi-bin/"
cd /home/USERNAME/public_html/cgi-bin/

vi php5.fcgi

Add the below lines in that
#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5

You need to give that file 755 permission to work.
chmod 755 php5.fcgi


Now add the below lines to the end of .htaccess
vi .htaccess
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.fcgi

save and exit.

Try checking with a phpinfo page to make sure it works
Arun
WebhostingDevelopment.com
a24uall
Site Admin
 
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am

Return to Custom php.ini

Who is online

Users browsing this forum: No registered users and 2 guests


cron