ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label php-cgi. Show all posts
Showing posts with label php-cgi. Show all posts

2009/11/12

How to get custom php.ini working on php-cgi

1, Copy the servers default php.ini to your home directory

2, Make the following directory in home and chown to user:user
cgi-bin

3, Create a file php.cgi in cgi-bin with the following content
#!/bin/sh
exec /usr/local/cpanel/cgi-sys/php5 -c /home/user/public_html/

4, Chmod +x php.cgi and chown the file to user:user.

5, Add the following in the .htaccess.

Action application/x-httpd-php5 /cgi-bin/php.cgi