Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP what are the effects of - cgi.fix_pathinfo = 1 - in php.ini on a webserver (wp)

Tags:

php

wordpress

ini

At my server , the host provide some alternative PHP.ini configs .

The only one that has the Extension Zip (which I need) is described as :

zip_cgi.fix_pathinfo

Advanced settings for experienced users with: cgi.fix_pathinfo = 1 and Extension Zip Enabled

I am using the website primarily for wordpress , but I would like to know what are the possible effects (or meaning) of this .

from : 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.

searching for google provided only blurry results for me ,as well as directly asking the host (the call center girls do not really understand , and the tech guys are not responsive ..)

like image 858
Obmerk Kronen Avatar asked Oct 22 '22 14:10

Obmerk Kronen


1 Answers

It seems that the ZIP extension expects the URL to be passed along as a PATH_INFO variable. CGI and FastCGI implementations of PHP do not have PATH_INFO available, so when trying to pass the URI along, PHP fails. One way around that is to set cgi.fix_pathinfo to true.

like image 150
ssergei Avatar answered Nov 03 '22 04:11

ssergei