note 47293 added to function.dom-domdocument-savexml

From: Date: Wed, 10 Nov 2004 11:33:28 +0000
Subject: note 47293 added to function.dom-domdocument-savexml
Groups: php.notes 
Request: Send a blank email to php-notes+get-80341@lists.php.net to get a copy of this message
This took me way to long to figure out: If you're completely lost on why DomDocument->saveXML() causes your scripts to timeout (regardless of your timeout settings), here's something you should check out. Edit your appearances of DomDocument->CreateTextNode($value); and replace them with DomDocument->CreateTextNode(utf8_encode($value)); If your $value isn't valid DomDocument won't give you an error on CreateTextNode but it'll cause a timeout on saveXML() (and makes you look in completely wrong places). I would like to see CreateTextNode() do utf8_encode within the function itself, but perhaps there are good reasons not to do this. ---- Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-savexml.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47293 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47293&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47293&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47293&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47293&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47293&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47293&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47293&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80341) next »