cPanel :: Enable individual php.ini on FastCGI

33 sec read

:: Requirement on vhost
make sure your vhost have these:

ScriptAlias /cgi-bin/ "/home/username/public_html/cgi-bin/"
Options +ExecCGI -Includes
AddHandler cgi-script .cgi .pl .plx .ppl .perl

 
:: Create FastCGI handler script

cd /home/username/public_html/cgi-bin/
vi php5.cgi

add these line:

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

 
:: Create custom / individual php.ini

cd /home/username/public_html/cgi-bin/
vi php.ini

example: enable register_globals, so add this line:

register_globals = On

 
:: Change permission / and owner

chmod 755 php5.cgi php.ini
chown username.username php5.cgi php.ini

 
:: Enable handler on .htaccess

vi .htaccess
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.cgi

 
:: Checking configuration

vi phpinfo.php

and see on Loaded Configuration File:

Loaded Configuration File	/home/username/public_html/cgi-bin/php.ini

 
:: Links
+ Google
+ BlogArvixe

How to fix problem with…

Facing a Git error with the 'vi' editor? Discover how to easily fix it by checking your Vim path and configuring Git to use...
Sysadmin.ID
10 sec read

Apache :: MP4 Streaming

Learn how to enable MP4 streaming in Apache with the installation of the mod_h264 streaming module, making your video content accessible and efficient. Follow...
Sysadmin.ID
18 sec read

Apache :: Flash / FLV…

Learn how to effortlessly configure Apache for FLV streaming by installing the mod_flvx module and updating your httpd.conf file. Discover the simple steps to...
Sysadmin.ID
15 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *