|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-18 10:24 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 23:00:01 2025 UTC |
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