note 77307 added to function.filter-input

From: Date: Thu, 23 Aug 2007 21:10:24 +0000
Subject: note 77307 added to function.filter-input
Groups: php.notes 
Request: Send a blank email to php-notes+get-129737@lists.php.net to get a copy of this message
FastCGI seems to cause strange side-effects with unexpected null values when using INPUT_SERVER and INPUT_ENV with this function. You can use this code to see if it affects your server: <?php var_dump($_SERVER); foreach ( array_keys($_SERVER) as $b ) { var_dump($b, filter_input(INPUT_SERVER, $b)); } echo '<hr>'; var_dump($_ENV); foreach ( array_keys($_ENV) as $b ) { var_dump($b, filter_input(INPUT_ENV, $b)); } ?> If you want to be on the safe side, using the superglobal $_SERVER and $_ENV variables will always work. You can still use the filter_* functions for Get/Post/Cookie without a problem, which is the important part! ---- Server IP: 194.145.210.3 Probable Submitter: 87.254.71.204 ---- Manual Page -- http://www.php.net/manual/en/function.filter-input.php Edit -- https://master.php.net/note/edit/77307 Del: integrated -- https://master.php.net/note/delete/77307/integrated Del: useless -- https://master.php.net/note/delete/77307/useless Del: bad code -- https://master.php.net/note/delete/77307/bad+code Del: spam -- https://master.php.net/note/delete/77307/spam Del: non-english -- https://master.php.net/note/delete/77307/non-english Del: in docs -- https://master.php.net/note/delete/77307/in+docs Del: other reasons-- https://master.php.net/note/delete/77307 Reject -- https://master.php.net/note/reject/77307 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129737) next »