From: luca at iv-srl dot it
Operating system: Windows XP
PHP version: 5.2.10
PHP Bug Type: DOM XML related
Bug description: Size limit on XML nodes
Description:
------------
I submit an attachment and then send via XML inside a node. When I
attach a file larger than 12k this function creates an empty node with
no evident error report on php.
(This is only a sample of the real code)
Reproduce code:
---------------
function creaElem($name, $value="", $parent=null)
{
$el=$this->Document->createElement($name);
if ($value!="")
$el->appendChild($this->Document->createTextNode($value));
if ($parent!=null)
$parent->appendChild($el);
return $el;
}
function AttachFile($parentnode,$attachmentname)
{
\\
$packet->creaElem("nomefile",$attachmentname,$parentnode);
$newnode=$packet->creaElem("attach","",$parentnode);
$whatsinside=file_get_contents ($_FILES['attachment']['tmp_name']);
$cdata=$this->Document->createCDATASection(base64_encode($whatsinside));
$newnode->appendChild($cdata);
}
Expected result:
----------------
When I run AttachFile(..) and My attachment size is larger than 12k this
function creates an empty node. With attachments<12k it works.
Any suggestion?
Thanks in advance
--
Edit bug report at http://bugs.php.net/?id=48701&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48701&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48701&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48701&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48701&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48701&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48701&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48701&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48701&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48701&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48701&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48701&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48701&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48701&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48701&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48701&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48701&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48701&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48701&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48701&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48701&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48701&r=mysqlcfg