Thanks you are right. Btw, I have another question: How to modified value in xml file using php ? Thanks. Yeo Wee Tat Tel: +65-62730049 Fax: +65-62734934 Cxrus Solutions Pte Ltd (Singapore . Thailand) 1003 Bukit Merah Central #05-20 Singapore 159836 System Integration . Business Solutions . Linux Simplified -----Original Message----- From: Chris [mailto:dmagick@xxxxxxxxx] Sent: Monday, June 26, 2006 10:52 AM To: weetat Cc: php-general@xxxxxxxxxxxxx Subject: Re: xmldoc issue weetat wrote: > Hi all , > > I have two server . > > In first server , which PHP version 4.3.2, the code below is ok : > > function validatexmlfile($xmlfilename) > { > $_logger = new Log4jLogger(); > $_logger->logdebug("starting validate xml"); > $_logger->logdebug("starting validate xml > xmlfilename:",$xmlfilename); > > if (!$doc = xmldocfile($xmlfilename)) { > die("Error in XML"); > $this->xml_error = TRUE; > } > // version check > else if ($doc->version > 1.0) { > die("Unsupported XML version"); > $this->xml_error = TRUE; > } else { > $this->xml_error = FALSE; > } > > > However in second server , it did not get past the xmldocfile() at all. > Anybody have any ideas what is happening ? I have set the > error_reporting to E_ALL , but it did not display any error at all. xmldocfile probably isn't a valid function because you don't have the xml extensions installed. try: <?php $exists = function_exists('xmldocfile'); if ($exists) { echo "xmldocfile exists!"; } else { echo "xmldocfile doesn't exist!"; } ?> -- Postgresql & php tutorials http://www.designmagick.com/ -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.4/375 - Release Date: 6/25/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php