Bug #75982 [NEW]: $_SERVER mostly empty with default variables_order GPCS on FastCGI/CGI
| From: | mattficken@php.net | Date: | Tue, 20 Feb 2018 05:52:29 +0000 |
| Subject: | Bug #75982 [NEW]: $_SERVER mostly empty with default variables_order GPCS on FastCGI/CGI | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-214042@lists.php.net to get a copy of this message | ||
From: mattficken
Operating system: Windows, any OS?
PHP version: master-Git-2018-02-20 (snap)
Package: *Configuration Issues
Bug Type: Bug
Bug description:$_SERVER mostly empty with default variables_order GPCS on FastCGI/CGI
Description:
------------
When variables_order=GPCS(default), $_SERVER is only populated with
PHP_SELF, REQUEST_TIME_FLOAT and REQUEST_TIME (PATH_TRANSLATED, etc...
are missing).
MediaWiki is broken on master. MediaWiki depends on
$_SERVER['PATH_TRANSLATED']. Other apps depend on this too. Drupal and
Wordpress are not affected.
If variables_order is set to EGPCS then $_SERVER is populated as
normal.
On 7.2, 7.1, 7.0, $_SERVER is populated when variables_order=GPCS or
EGPCS, so $_SERVER is populated by default.
This this an intentional behavior change? Or a bug?
I am still investigating, but at this time I believe this is caused by
this:
http://git.php.net/?p=php-src.git;a=commitdiff;h=bdf77f02f637bc0efbb55a800be1860279cc5b3e
If this is an intentional behavior change, then
http://php.net/manual/en/ini.core.php#ini.variables-order
should be
updated now or when PHP 7.3 is released (also should tell MediaWiki).
Test script:
---------------
Check phpinfo(); on web server.
Or var_dump($_SERVER) on web server.
This isn't a problem on CLI sapi.
php -i includes $_SERVER
--
Edit bug report at https://bugs.php.net/bug.php?id=75982&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75982&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75982&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75982&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75982&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75982&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75982&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75982&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75982&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75982&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75982&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75982&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75982&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75982&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75982&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75982&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75982&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75982&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75982&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75982&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75982&r=mysqlcfg