Bug #79382 [NEW]: Fatal error: Cannot redeclare getallheaders() in ...

From: Date: Fri, 13 Mar 2020 23:11:12 +0000
Subject: Bug #79382 [NEW]: Fatal error: Cannot redeclare getallheaders() in ...
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226100@lists.php.net to get a copy of this message
From: admin at franceserv dot fr Operating system: Linux PHP version: 7.3.15 Package: *General Issues Bug Type: Bug Bug description:Fatal error: Cannot redeclare getallheaders() in ... Description: ------------ Hello, Several websites are affected (Wordpress, NextCloud, PMB, Phpbb etc ...) on PHP 7.3.x till this version (7.3.15) and same with PHP 7.4 till now since several month. The problem isn't present with PHP 7.2.x and lower. The affected function is : if (!function_exists('getallheaders')) With PHP 7.3 and 7.4 the following error is reported : Fatal error: Cannot redeclare getallheaders() in ... With exactly the same website without modification files the problem is not present on PHP 7.2 and lower. Sample error message on PHP 7.3 and 7.4 : Nextcloud : Fatal error: Cannot redeclare getallheaders() in /home/httpd/*/*/*/*/*/3rdparty/ralouphie/getallheaders/src/getallheaders.php on line 10 PhpBB : /home/httpd/*/*/*/*/*/forum/vendor/ralouphie/getallheaders/src/getallheaders.php on line 10 PMB : /home/httpd/*/*/*/*/*/includes/apache_functions.inc.php on line 10 Wordpress etc ... All web developers are saying to rename the function "function getallheaders()" to avoid this error message ... which is not possible to everybody which are not developers ... I'm using PHP 7.2, 7.3 and 7.4 on PHP-FPM with compilation install. Someone could solve this problem which become more visible since people are upgrading their website to PHP 7.3 and + ? Thank you in advance. Actual result: -------------- Fatal error: Cannot redeclare getallheaders() in ... -- Edit bug report at https://bugs.php.net/bug.php?id=79382&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79382&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79382&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79382&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79382&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79382&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79382&r=support Expected behavior: https://bugs.php.net/fix.php?id=79382&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79382&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79382&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79382&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79382&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79382&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79382&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79382&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79382&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79382&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79382&r=mysqlcfg

« previous php.bugs (#226100) next »