From: robin at newloop dot com
Operating system: Win XP Pro 2002 SP1
PHP version: 4.3.2
PHP Bug Type: HTTP related
Bug description: missing character in POST data
Description:
------------
On requesting POST data using $_POST or $_REQUEST that
is being sent using Macromedia Flash MX, the last
character of the last request is missing. Work around
is to send a dummy variable as the last request.
Reproduce code:
---------------
<?
$filePath = stripslashes($_REQUEST["cmsFilePath"]);
$fileDataTotal = stripslashes($_REQUEST["cmsFileDataTotal"]);
$fileData = " ";
for ($counter = 0; $counter < $fileDataTotal; $counter ++){
$newPart = stripslashes($_REQUEST["cmsFileData".$counter]);
$fileData = $fileData.$newPart;
}
$fileName = stripslashes($_REQUEST["cmsFileName"]);
$test = stripslashes($_REQUEST["cmstest"]);
$start = time();
while (time()<($start +5)) {
}
$tfile = $filePath."/".$fileName;
touch($tfile);
chmod($tfile, 0666);
$handle = fopen($tfile, "wb");
fwrite($handle, $fileData.$test);
fclose($handle);
?>
Expected result:
----------------
the $test variable should contain the string "hello"
Actual result:
--------------
the $test variable actually contains "hell"
All other variables are ok.
--
Edit bug report at http://bugs.php.net/?id=24753&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24753&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24753&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24753&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24753&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24753&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24753&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24753&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24753&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24753&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24753&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24753&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24753&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24753&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24753&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24753&r=gnused