php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #46987 Maximum String Length for XML Nodes is not documented
Submitted: 2009-01-01 17:42 UTC Modified: 2009-01-14 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: eric at midkotasolutions dot com Assigned: rrichards (profile)
Status: No Feedback Package: Documentation problem
PHP Version: 5.2.8 OS: RedHat E5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eric at midkotasolutions dot com
New email:
PHP Version: OS:

 

 [2009-01-01 17:42 UTC] eric at midkotasolutions dot com
Description:
------------
Note that there is a limitation to the maximum size of a string for a 
node.  I am submitting here in as documentation.

I have a string that is 455K in Size.  I tried creating an XML Node 
with this string as it's value, but the string always gets cut off at 
about 83K - 

I attempted using both the nodeValue property, and by creating a new 
DOMTextNode.



Reproduce code:
---------------

To replicate, create a string that is greater than 83K (or so) - 
<?php

$string="text that is really big"

$node=new DOMText($string);

echo $node->wholeText;

?>


The echo'd value will be cut off at about 83K



Expected result:
----------------
Is there a reason for the limitation? - Or, is this a bug?





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-02 02:30 UTC] johannes@php.net
Rob, can you clarify whether that's an PHP or libxml2 limitation? Thanks.
 [2009-01-06 10:50 UTC] rrichards@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

I cannot reproduce this.
Using a script similar to what you posted, I hit no 
limitation on string length. Was easily able to write/read using a 
string 300K long. Are you able to duplicate this on other platforms as 
well?
 [2009-01-14 01:00 UTC] doc-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC