I\'m using Apache 2.4.7 and PHP 5.5.7.
I have a test.php
file in C:\\web\\vhosts\\Symfony\\web
.
The value of $_SERVER[\'SCRIP
Now I know what's wrong:
FcgidFixPathinfo 1
Set this value to 0. You can also comment it out, or remove it altogether, since 0 is the default.
According to the documentation:
This directive enables special SCRIPT_NAME processing which allows PHP to provide additional path information. The setting of FcgidFixPathinfo should mirror the cgi.fix_pathinfo setting in php.ini.
However I found that the value of cgi.fix_pathinfo
in the php.ini
file makes absolutely no influence as to the value of $_SERVER['SCRIPT_NAME']
:
When FcgidFixPathinfo
is set to 0
in the httpd.conf
file, $_SERVER['SCRIPT_NAME']
is correct (/test.php
), regardless of the value of cgi.fix_pathinfo
in the php.ini
file.
When FcgidFixPathinfo
is set to 1
in the httpd.conf
file, $_SERVER['SCRIPT_NAME']
is incorrect (C:/test.php
), regardless of the value of cgi.fix_pathinfo
in the php.ini
file.