|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42824 Post Data truncated
Submitted: 2007-10-02 06:52 UTC Modified: 2007-10-02 09:23 UTC
From: webmaster at thedotcomoffice dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.2.4 OS: Windows2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: webmaster at thedotcomoffice dot com
New email:
PHP Version: OS:


 [2007-10-02 06:52 UTC] webmaster at thedotcomoffice dot com
The data which was sent via POST, was truncated at the first occurrence of "&" Data following "&" was stripped off.

Reproduce code:
First line of Data posted -
<?xml version="1.0" encoding="ISO-8859-1"?>
Line which caused problem 
<Company>M &amp; M International Trading</Company>

I have tried all the following but $_POST['upload'] does not contain complete data.

Maximum allowed post size is 8M in php.ini and post data is less than 1 MB
If special entities "&amp;"  were not present in the post data, everything works fine without any problem.
I am using PHP 5.0.5

Expected result:
If special entities i.e. "&amp;"  were not present in the post data, everything works fine without any problem.

I haven't yet tested my code with POST data containing other special entities.

Actual result:
Because of premature end of data, the following line of code fails:
$xml = simplexml_load_string($upload);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-02 09:23 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 20:05:53 2022 UTC