在我的服务器上,主机提供了一些替代的 PHP.ini 配置。
唯一具有扩展 Zip(我需要)的描述为:
zip_cgi.fix_pathinfo
Advanced settings for experienced users with: cgi.fix_pathinfo = 1 and Extension Zip Enabled
我主要为 wordpress 使用该网站,但我想知道这可能产生的影响(或意义)是什么。
来自:http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
Provides real PATH_INFO/ PATH_TRANSLATED support for CGI. PHP's previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok what PATH_INFO is. For more information on PATH_INFO, see the CGI specs. Setting this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting of zero causes PHP to behave as before. It is turned on by default. You should fix your scripts to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
搜索google只提供了模糊的结果,以及直接询问主机(调用中心的女孩不太明白,技术人员也没有回应..)
最佳答案
ZIP 扩展似乎希望 URL 作为 PATH_INFO 变量传递。 PHP 的 CGI 和 FastCGI 实现没有可用的 PATH_INFO,因此当尝试传递 URI 时,PHP 失败。一种解决方法是将 cgi.fix_pathinfo 设置为 true。
关于PHP - cgi.fix_pathinfo = 1 - 在网络服务器上的 php.ini 中有什么影响(wp),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15493207/