php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77208 $_POST and other server superglobals become 'unset'
Submitted: 2018-11-27 11:01 UTC Modified: 2018-11-29 20:44 UTC
From: duncan dot courts at codex-atc dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 7.1.24 OS: Windows 7 Professional
Private report: No CVE-ID: None
 [2018-11-27 11:01 UTC] duncan dot courts at codex-atc dot com
Description:
------------
After a period of normal operation, $_POST 'disappears' and isset() returns false. Restarting Apache instantly restores normal operation. The same has occurred with $_COOKIE, $_REQUEST, and $_SERVER, but not at the same time as $_POST. This has happened on different servers at different sites running the same PHP code. Occurrence frequency varies a lot, but can occur as little as a couple of hours after restart. There are no resource limitations and everything else appears normal. None of my code modifies the superglobals, only reads single array elements into other named variables. Apache version is 2.4.35.

Test script:
---------------
print_r($_POST);
// Normal operation - prints Array() 
// After fault appears - prints nothing

isset($_POST);
// Normal operation - returns TRUE
// After fault appears - returns FALSE


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-28 21:06 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2018-11-28 21:06 UTC] ab@php.net
Thanks for the report. Do you use PHP as Apache module?

Thanks.
 [2018-11-29 11:53 UTC] duncan dot courts at codex-atc dot com
> Thanks for the report. Do you use PHP as Apache module?

Yes, as part of Bitnami WAMPstack.
 [2018-11-29 20:44 UTC] ab@php.net
-Status: Feedback +Status: Not a bug
 [2018-11-29 20:44 UTC] ab@php.net
Thanks for the further info. Please upgrade PHP to at least 7.2, thread safety issues like this have been fixed there. Or, if you have to use 7.1, please use a non thread safe SAPI.

Thanks.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 21:03:35 2022 UTC