#49184 [Opn->Ver]: INPUT_SERVER returns NULL for set variables (CLI)

From: Date: Fri, 07 Aug 2009 10:20:34 +0000
Subject: #49184 [Opn->Ver]: INPUT_SERVER returns NULL for set variables (CLI)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140773@lists.php.net to get a copy of this message
ID: 49184 Updated by: jani@php.net Reported By: m dot kurzyna at crystalpoint dot pl -Status: Open +Status: Verified Bug Type: Filter related -Operating System: Linux +Operating System: * -PHP Version: 5.3.0 +PHP Version: 5.*, 6 (2009-08-07) New Comment: This is quite strange, propably caused by bad design of the filter extension. Previous Comments: ------------------------------------------------------------------------ [2009-08-06 21:48:51] m dot kurzyna at crystalpoint dot pl Description: ------------ This is very similar to #44779, however my report regards variables set as environment variables when running CLI. A variable is visible in $_SERVER but INPUT_SERVER returns NULL. Setting via SetEnv in apache and when running as mod_php is fine. Reproduce code: --------------- <?php var_dump( filter_input(INPUT_SERVER,'ENV_NAME',FILTER_SANITIZE_STRING), $_SERVER['ENV_NAME'] ); ?> Expected result: ---------------- $ ENV_NAME=var php /tmp/t.php string(3) "var" string(3) "var" Actual result: -------------- $ ENV_NAME=var php /tmp/t.php NULL string(3) "var" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49184&edit=1

« previous php.bugs (#140773) next »