简体   繁体   English

覆盖PHP-FPM中的PHP设置

[英]Overriding PHP settings in PHP-FPM

I am on Debian 7 Wheezy, with Apache2 Worker and PHP-FPM running with FastCGI. 我在Debian 7 Wheezy上,使用FastCGI运行Apache2 Worker和PHP-FPM。 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. 我有多个网站(和池)在其上运行,其中一些由自己的网站管理员管理,无法访问全局php配置或池配置。

I'm looking for a way to override PHP ini settings on a per-directory basis. 我正在寻找一种基于每个目录覆盖PHP ini设置的方法。 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; 从我从这里其他问题以及Internet上各个页面收集的信息来看,似乎无法像在mod_php5下那样使用.htaccess。 nor I can use .user.ini files because apparently they only work with the CGI/FastCGI SAPI. 我也无法使用.user.ini文件,因为显然它们仅与CGI / FastCGI SAPI一起使用。

so....what's left? 所以...还剩下什么? no way to override setting with FPM? 没有办法用FPM覆盖设置?

Ok I think that after some testing I have found the answer. 好的,我认为经过一些测试,我找到了答案。

.user.ini files do actually work in php-fpm. .user.ini文件实际上可以在php-fpm中工作。 The only problem that I found is that apparently you cannot override settings that have been set in the pool configuration files. 我发现的唯一问题是,显然您无法覆盖池配置文件中已设置的设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM