Re: DOMDocument Size limit
| From: | Jochem Maas | Date: | Tue, 19 Dec 2006 07:51:37 +0000 |
| Subject: | Re: DOMDocument Size limit | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246009@lists.php.net to get a copy of this message | ||
Chris W wrote:
> Jochem Maas wrote:
>> what version of php? what version of libxml?
>>
> php: 5.2.0
> libxml: 2.6.26
nothing wrong there I believe, although I haven't yet played with php5.2 myself
>> is the limit actually 4096 bytes per chance? (that seems more likely)
>
> the limit is probably 4096 but I think it may be due to the length of
> tags and other things not just the value.
>> what happens when you create the element with an empty value then use
>> something like this?:
>>
>> $el = $foo->createElement($name, '');
>> $el->nodeValue = $yourBigString;
>>
>
> Same thing happened there
>> also are you able to use $foo->createElementNS() ? does that suffer
>> from the same limit?
>>
>>
>
> I'm not familiar enough with the how this dom works to make that
> modification. I didn't write this code I'm just trying to fix it.
>
>
>> could it be a problem with the actual contents of your $value variable?
>> what does it contain? (especially around the 4K bytes mark)
>>
>
> the variable contains htmlspecialchars encoded html. The next character
this last comment leads me to believe that the data in $value (your html)
should be contained in a CDATA node, in which case you should be
using the following to create a the CDATA node and add $value to that, after
which you can add the CDATA node to the node your are currently trying to
add $value to:
http://php.net/manual/en/function.dom-domdocument-createcdatasection.php
> after it stops is either a space or a period.
>> I tried in vain to find something in the php source that might
>> point to your problem.. that's not to say there is nothing there, it's
>> just my
>> skills/understanding aren't up to the job.
>>
>>
> I looked for something in the php.ini file but the only thing I found
> was output_buffering = 4096 and that doesn't seem like it would be a
> problem.
agreed - but in the spirit of Murphy it's worth setting it to something
bigger to see if it has affect.
>