custom “php.ini” with PHP5 on Fastcgi

If you use FastCGI (called FCGI too,) as a PHP Loader on a server you won’t be able to set custom php values into .htaccessfile. instead you will have to create a wrapper for the main FCGI binary which makes the php.ini loaded from it’s current working directory instead of server-wide one! to achieve that follow this instructions.


Open “.htaccess” file for the account you want to use custom php.ini file and insert following lines to the bottom of the file:



Then you need to copy the source php.ini file which is located in /usr/local/lib to account cgi-bin directory. be aware that you have to fix the ownership issues that happen when you use root user to copy the file.



Now you have to create the wrapper script. create a file in cgi-bin directory and name it php5.fcgi and enter following content into it.


Finally, make sure the ownership and permissions are correct.


Incoming search terms:

  • Source:
  • Source:
  • custom php ini cpanel fast cgi
  • custom php ini for fcgi
  • fast-cgi php ini
  • php fastcgi php ini
  • php ini fcgi
  • php5 fastcgi

Leave a comment

Leave a Reply