#33655 [Opn->Bgs]: PHP seams to not processing the POST data

From: Date: Tue, 12 Jul 2005 16:07:36 +0000
Subject: #33655 [Opn->Bgs]: PHP seams to not processing the POST data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81765@lists.php.net to get a copy of this message
ID: 33655 Updated by: sniper@php.net Reported By: gzsolt at yahoo dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Windows XP SP1 PHP Version: 4.3.11 New Comment: Fix your webserver.. Previous Comments: ------------------------------------------------------------------------ [2005-07-12 17:14:22] mgazza2 at hotmail dot com i fixed it without using the code!! i left spaces in the envar Content_legnth and content_type eg $_SERVER["CONTENT_LENGTH"]=' 8' perl is ok with this but php doesnt want the space check your server code to see if it was doin the same as mine sorry php guys looks like it was my bad :( ------------------------------------------------------------------------ [2005-07-12 17:00:21] gzsolt at yahoo dot com tonny2001: a few hours ago i tried the 4.4 and 5.? php (i dont remember right now, and at home i dont have internet access :( ), in both case the problem persist. If you want i can post the code, but is merely more then a form width two fields (user / pass), and a print_r($_POST); . mgazza2: Thanks for your tip (adding the \r\n), i will try out as soon as i get home. The code you sent lately would not be an option, because i want to use php witch i did not wrote and dont want them edit (phpmyadmin for example), but thanks, if the other tip does not help, i will use it perhaps in my own scripts. Ps.: Sorry for my bad english! ------------------------------------------------------------------------ [2005-07-12 16:51:47] mgazza2 at hotmail dot com 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 ------------------------------------------------------------------------ [2005-07-12 16:33:58] mgazza2 at hotmail dot com 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]); } } ?> ------------------------------------------------------------------------ [2005-07-12 16:02:18] mgazza2 at hotmail dot com still what if i needed to create a game which alowed people to interface "bot" behaviour and i wanted to use php to achive this, this bug is that php is not compliant with cgi/1.1 apache will use mod_cgi and fast cgi. the orginal post also buy the looks uses there own server also im guessing it will be totally different to mine except the way in which it calls php. its oka i can easily fix this problem its just that the server will no longer truely be compliant with cgi/1.1 regards mark ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/33655 -- Edit this bug report at http://bugs.php.net/?id=33655&edit=1

« previous php.bugs (#81765) next »