When using FastCGI (FCGI) as the loader for PHP, traditional php_values in the .htaccess file as well as custom php.ini files in the public_html directory no longer work. Instead we must create a wrapper for the main FCGI binary that causes the php.ini to be loaded from it’s current working directory instead of the server-wide one.
Edit the .htaccess file in the directory you want to use a custom PHP configuration for and add the following lines to the bottom of the file:
Next, you’ll need to copy your your main server php.ini which is located in /usr/local/lib/. Also note that it needs to have the correct ownership.
Create a file in your current directory (cgi-bin) called php5.fcgi
as defined above and add the following:
Finally, make sure the ownership and permissions are correct on this file:
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 PHPscript on that user account.