Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to enable Custom php.ini in FastCGI  (Read 2955 times)

0 Members and 1 Guest are viewing this topic.

mohitht

  • Guest
How to enable Custom php.ini in FastCGI
« on: January 16, 2014, 09:50:13 pm »
Hi Guyz,


For  fast-cgi we need to create a custom php.ini which should be placed in cgi-bin folder.


First move php.ini to cgi-bin folder

Under the cgi-bin folder, create php.fcgi and enter the following lines in the file


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


Save the file and enter the command line and change the permission as follows

# chmod php.fcgi to 755.


Create a .htaccess file in public_html folder and enter the following details


AddHandler php5-fastcgi .php

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



That's It  :)

Thank you.