From: [EMAIL PROTECTED] Operating system: Mac PHP version: 5.3CVS-2008-04-18 (snap) PHP Bug Type: Filter related Bug description: filter returns NULL in CLI when it shouldn't
Description: ------------ The filter extension appears to have issues with CLI. I have not fully tested it but will provide examples below to demonstrate the problem. These tests use INPUT_SERVER, but others may be affected. Note: The same code is working correctly for me in mod_php. Reproduce code: --------------- philip$ cat > foo.php <?php var_dump( filter_input(INPUT_SERVER, 'PHP_SELF') ); var_dump( $_SERVER['PHP_SELF'] ); ^C philip$ php foo.php NULL string(7) "foo.php" philip$ php -r 'var_dump($_SERVER["PHP_SELF"]);' string(1) "-" philip$ php -r 'var_dump( filter_input(INPUT_SERVER, "PHP_SELF"));' NULL -- Edit bug report at http://bugs.php.net/?id=44779&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44779&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44779&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44779&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44779&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44779&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44779&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44779&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44779&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44779&r=support Expected behavior: http://bugs.php.net/fix.php?id=44779&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44779&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44779&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44779&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44779&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44779&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44779&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44779&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44779&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44779&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44779&r=mysqlcfg