|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-12 12:00 UTC] gzsolt at yahoo dot com
Description: ------------ I am using PHP 4.3.11 under Windows XP. I run the CGI version from my own webserver (meaning i wrote it). The CGI support is OK i my webserver, other CGI programs working fine. The problem is the following: a simple login forms posts data to a php page. The webserver gets, the request inc. post data. It start php, sends the post data trough STDIN. PHP reads out all data from STDIN (Content-Length bytes), it gets to the $HTTP_RAW_POST_DATA variable, but the $_POST and $HTTP_POST_VARS arrays remaining empty! I have no clue what could cause this problem, possibly not a bug at all, but i did not find any problem in my php config (i can post it, if needed). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 02:00:01 2025 UTC |
heres a simple script to include() at the begging of all files to your server to get php $_POST to be defined you can now thank me, :D how ever this only works with url encoded data <?php if ($SERVER["REQUEST_METHOD"]="POST") if (strtolower($SERVER["CONTENT_TYPE"])='application/x-www-form-urlencoded'){ $ValueArray=split('[&]', $HTTP_RAW_POST_DATA); foreach ($ValueArray as $V){ $V=split('=', $V); $_POST[$V[0]]=urldecode($V[1]); } } ?>if (strpos($_SERVER["REQUEST_METHOD"],"POST")<>-1){ if (strpos($_SERVER["CONTENT_TYPE"],'application/x-www-form-urlencoded')<>-1){ $ValueArray=split('[&]', $HTTP_RAW_POST_DATA); foreach ($ValueArray as $V){ $V=split('=', $V); $_POST[$V[0]]=urldecode($V[1]); } } } opps slight mistake lolz