覆盖PHP-FPM中的PHP设置

我在Debian 7 Wheezy上,Apache2 Worker和PHP-FPM与FastCGI一起运行。 我在其上运行了多个网站(和池),其中一些由他们自己的网站管理员管理,无法访问全局php配置或池配置。</ p>

我正在寻找一种方式 在每个目录的基础上覆盖PHP ini设置。
从我从这里的其他问题和互联网上的各个页面收集到的内容,似乎不可能像我在mod_php5下那样使用.htaccess; 我也不能使用.user.ini文件,因为它们显然只适用于CGI / FastCGI SAPI。</ p>

所以......还剩下什么? 无法用FPM覆盖设置?</ p>
</ div>

展开原文

原文

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?

1个回答



好的我认为经过一些测试后我找到了答案。</ p>

.user.ini 文件在php-fpm中实际工作</ strong>。 我发现的唯一问题是显然你不能覆盖池配置文件中设置的设置。</ p>
</ div>

展开原文

原文

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.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐