Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
cpanel:custom-php-ini-fastcgi [2010-10-08 00:17:28]
garrett.plasky Approved
cpanel:custom-php-ini-fastcgi [2011-06-30 23:04:12]
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:
  
-<code console>cd /home/user/public_html/cgi-bin/+<sxh shell>cd /home/user/public_html/cgi-bin/
 # cp -a /usr/local/lib/php.ini . # cp -a /usr/local/lib/php.ini .
-# chown user:user php.ini</code>+# chown user:user php.ini</sxh>
  
 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:
Line 23: Line 23:
 Finally, make sure the ownership and permissions are correct on this file: Finally, make sure the ownership and permissions are correct on this file:
  
-<code console>chown user:user php5.fcgi && chmod 0755 php5.fcgi</code>+<sxh shell>chown user:user php5.fcgi && chmod 0755 php5.fcgi</sxh>
  
 You can now edit the php.ini inside cgi-bin/ and change the desired values. You can verify they are set properly by inserting the phpinfo() function inside a PHP script on that user account. You can now edit the php.ini inside cgi-bin/ and change the desired values. You can verify they are set properly by inserting the phpinfo() function inside a PHP script on that user account.
  
 {{tag>cpanel php how-to fcgi}} {{tag>cpanel php how-to fcgi}}