Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
cpanel:custom-php-ini-fastcgi [2010-10-08 00:16:30]
garrett.plasky created
cpanel:custom-php-ini-fastcgi [2011-04-06 23:06:56]
garrett.plasky Approved
Line 5: Line 5:
 First open .htaccess for the account in question and add the following lines to the bottom of the file: First open .htaccess for the account in question and add the following lines to the bottom of the file:
  
-<code>AddHandler php5-fastcgi .php +<sxh plain>AddHandler php5-fastcgi .php 
-Action php5-fastcgi /cgi-bin/php5.fcgi</code>+Action php5-fastcgi /cgi-bin/php5.fcgi</sxh>
  
 Next, you'll need to source your main server php.ini which is located in /usr/local/lib/. Also note that it needs to have the correct ownership so we'll take care of that too: Next, you'll need to source your main server php.ini which is located in /usr/local/lib/. Also note that it needs to have the correct ownership so we'll take care of that too:
Line 14: Line 14:
 # chown user:user php.ini</code> # chown user:user php.ini</code>
  
-NExt we need to create the wrapper script. Create a file in your current directory (cgi-bin) called  <c>php5.fcgi</c> as defined above and add the following:+Next we need to create the wrapper script. Create a file in your current directory (cgi-bin) called  <c>php5.fcgi</c> as defined above and add the following:
  
-<code bash>#!/bin/sh+<sxh bash>#!/bin/sh
 export PHP_FCGI_CHILDREN=1 export PHP_FCGI_CHILDREN=1
 export PHP_FCGI_MAX_REQUESTS=10 export PHP_FCGI_MAX_REQUESTS=10
-exec /usr/local/cpanel/cgi-sys/php5</code>+exec /usr/local/cpanel/cgi-sys/php5</sxh>
  
 Finally, make sure the ownership and permissions are correct on this file: Finally, make sure the ownership and permissions are correct on this file: