From: robbhammack at gmail dot com Operating system: Win2K sp2 PHP version: 5.1.0b2 PHP Bug Type: Scripting Engine problem Bug description: $_POST superglobal not populated
Description: ------------ When submitting a html form using the post method, the superglobals $_POST and $_REQUEST are not populated. The $HTTP_RAW_POST_DATA is. When submitting using get, the $_GET and $_REQUEST work as expected. I first noticed this in 5.1.0b2 and upgraded to 5.1.0b3 to see if it had been fixed. OS is win2K xp2 PHP Version 5.1.0b3 System Windows NT MINERVA 5.1 build 2600 Build Date Jul 14 2005 20:32:24 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API Apache 2.0 Handler Virtual Directory Support enabled Configuration File (php.ini) Path C:/Development/programs/php5/php.ini PHP API 20041225 PHP Extension 20050617 Zend Extension 220050617 Apache Version Apache/2.0.53 (Win32) PHP/5.1.0b3 DAV/2 Apache API Version 20020903 Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access mod_actions mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dav mod_dav_fs mod_dir mod_env mod_imap mod_include mod_info mod_isapi mod_log_config mod_mime mod_negotiation mod_setenvif mod_userdir mod_php5 Reproduce code: --------------- <html> <head> </head> <body> <?php print("Request method: " . $_SERVER['REQUEST_METHOD']."<br />"); print("Dump of HTTP RAW POST DATA ". var_dump($HTTP_RAW_POST_DATA)."<br />"); print("Dump of POST Data" . var_dump($_POST)."<br />"); print("Dump of REQUEST Data" . var_dump($_REQUEST)."<br />"); ?> <form method="POST" action="login.php?action=login" enctype="text/plain"> <input type="text" size="40" name="username" id="username"></input><br /> <input type="text" size="40" name="passwd" id="passwd"></input><br /> <input type="submit" name="submit" id="submit" value="Login"></input> </form> </body> </form> Expected result: ---------------- I expect the var_dump($_POST)and var_dump($_REQUEST) to output the values from the form elements. I verified that the form was using the post method two ways: liveHTTPHeaders and $_SERVER['REQUEST_METHOD'] Actual result: -------------- URL: http://projectmanager/login.php?action=login Results: Request method: POST string(42) "username=Robb passwd=Robb submit=Login " Dump of HTTP RAW POST DATA array(0) { } Dump of POST Data array(1) { ["action"]=> string(5) "login" } Dump of REQUEST Data -- Edit bug report at http://bugs.php.net/?id=33741&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33741&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33741&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33741&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33741&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33741&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33741&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33741&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33741&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33741&r=support Expected behavior: http://bugs.php.net/fix.php?id=33741&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33741&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33741&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33741&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33741&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33741&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33741&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33741&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33741&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33741&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33741&r=mysqlcfg