Bug #77285 [Com]: Missing REQUEST_METHOD in INPUT_SERVER

From: Date: Fri, 05 Aug 2022 09:28:11 +0000
Subject: Bug #77285 [Com]: Missing REQUEST_METHOD in INPUT_SERVER
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242131@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77285&edit=1 ID: 77285 Comment by: daaxlxgaxvzfhjcpnz at nthrw dot com Reported by: m49434s at gmail dot com Summary: Missing REQUEST_METHOD in INPUT_SERVER Status: Open Type: Bug Package: Filter related Operating System: FreeBSD PHP Version: 7.3.0 Block user comment: N Private report: N New Comment: The problem affects Apache + fcgid + php-cgi 8.1.9 too. It't caused by auto_globals_jit enabled . When disabled, filter_input(INPUT_SERVER) works correctly. Previous Comments: ------------------------------------------------------------------------ [2021-10-27 10:49:39] cmb@php.net I tried again with PHP 7.4.19 and IIS (so same SAPI), but still cannot reproduce that filter_input() call failing, regardless of the setting of auto_globals_jit. I have no idea why it fails for you. Sorry! ------------------------------------------------------------------------ [2021-10-20 19:24:12] m49434s at gmail dot com Many thanks for looking into this. Yes, lighttpd 1.4.59 with mod_fastcgi is used ------------------------------------------------------------------------ [2021-10-20 14:59:10] cmb@php.net Thanks for checking and the swift reply! Are you using FCGI or FPM specifically? ------------------------------------------------------------------------ [2021-10-20 14:44:26] m49434s at gmail dot com filter_has_var is still reporting false for INPUT_SERVER / REQUEST_METHOD in PHP 7.4.19, although $_SERVER has it: PHP version: 7.4.19 filter_has_var: INPUT_SERVER field REQUEST_METHOD does not exist Array ( [PATH] => /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin [PHP_FCGI_CHILDREN] => 2 [PHP_FCGI_MAX_REQUESTS] => 500 [PATH_TRANSLATED] => /usr/local/www [ORIG_SCRIPT_FILENAME] => /usr/local/www/test.php/ [SSL_CIPHER_ALGKEYSIZE] => 256 [SSL_CIPHER_USEKEYSIZE] => 256 [SSL_CIPHER] => TLS_AES_256_GCM_SHA384 [SSL_PROTOCOL] => TLSv1.3 [HTTP_COOKIE] => <removed> [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.9,de-DE;q=0.8,de;q=0.7,fr;q=0.6 [HTTP_ACCEPT_ENCODING] => gzip, deflate, br [HTTP_REFERER] => https://192.168.0.44/test.php [HTTP_SEC_FETCH_DEST] => document [HTTP_SEC_FETCH_USER] => ?1 [HTTP_SEC_FETCH_MODE] => navigate [HTTP_SEC_FETCH_SITE] => same-origin [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_DNT] => 1 [HTTP_UPGRADE_INSECURE_REQUESTS] => 1 [HTTP_ORIGIN] => https://192.168.0.44 [HTTP_SEC_CH_UA_PLATFORM] => "Linux" [HTTP_SEC_CH_UA_MOBILE] => ?0 [HTTP_SEC_CH_UA] => "Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99" [HTTP_CACHE_CONTROL] => max-age=0 [HTTP_CONTENT_LENGTH] => 19 [HTTP_HOST] => 192.168.0.44 [REMOTE_PORT] => 55474 [REMOTE_ADDR] => 192.168.0.65 [SERVER_NAME] => 192.168.0.44 [SERVER_ADDR] => 192.168.0.44 [SERVER_PORT] => 443 [HTTPS] => on [REQUEST_SCHEME] => https [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_SOFTWARE] => WebGUI [SERVER_PROTOCOL] => HTTP/2.0 [REQUEST_METHOD] => POST [DOCUMENT_ROOT] => /usr/local/www [SCRIPT_FILENAME] => /usr/local/www/test.php [SCRIPT_NAME] => /test.php [REDIRECT_STATUS] => 200 [REQUEST_URI] => /test.php [QUERY_STRING] => [CONTENT_LENGTH] => 19 [FCGI_ROLE] => RESPONDER [PHP_SELF] => /test.php [REQUEST_TIME_FLOAT] => 1634740929.8279 [REQUEST_TIME] => 1634740929 ) ------------------------------------------------------------------------ [2021-10-20 10:24:10] cmb@php.net I cannot reproduce this with PHP-7.4 and the CGI SAPI. Can anybody else still reproduce this with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77285 -- Edit this bug report at https://bugs.php.net/bug.php?id=77285&edit=1

« previous php.bugs (#242131) next »