Search code examples
phpapache.htaccessfastcgi

Overriding PHP settings in PHP-FPM


I am on Debian 7 Wheezy, with Apache2 Worker and PHP-FPM running with FastCGI. I have multiple websites (and pools) running on it, some of them managed by their own webmasters with no access to the global php configuration or pools configurations.

I'm looking for a way to override PHP ini settings on a per-directory basis. From what I gathered from other questions here and various pages on the internet, it seems that it is not possible to use .htaccess as I did under mod_php5; nor I can use .user.ini files because apparently they only work with the CGI/FastCGI SAPI.

so....what's left? no way to override setting with FPM?


Solution

  • Ok I think that after some testing I have found the answer.

    .user.ini files do actually work in php-fpm. The only problem that I found is that apparently you cannot override settings that have been set in the pool configuration files.