Fatal Error Call To Undefined Function Domxml_new_doc
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more call to undefined function domxml_new_doc php5 about Stack Overflow the company Business Learn more about hiring developers or posting ads domxml_new_doc not working with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow class domxml_new_doc not found is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Call to undefined function domxml_new_doc() [duplicate] up vote 0 down vote favorite domxml_new_doc() php5 Possible Duplicate: How to solve “call to undefined function domxml_new_doc()…” I'm using php5, when I try initializing a domxml_new_doc() it gives following error Call to undefined function domxml_new_doc() I checked phpinfo and found that DOM/XML is enabled... Here is the code line which gives me the error $doc = domxml_new_doc("1.0"); php xml dom share|improve this question edited Dec 20 '12 at 22:07 hakre 134k26216387 asked Jun 28 '11 at
Domxml_new_doc( 1.0 )
8:09 Pavithra Gunasekara 1,19362441 marked as duplicate by Frédéric Hamidi, Gilles, kapa, Eugene Mayevski 'EldoS, C. A. McCann Jun 28 '11 at 17:17 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. 1 There are two extension "DOMDocument" and "DOM XML (PHP4)" ( php.net/manual/en/refs.xml.php ). You are sure you enabled the right one? –KingCrunch Jun 28 '11 at 8:12 stackoverflow.com/questions/3006246/… check this one. –afarazit Jun 28 '11 at 8:13 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted As suggested by KingCrunch, you're likely to be using PHP5. In that case, just use DomDocument instead. However if you're still using PHP4, then the following test will tell you whether the extension is loaded: var_dump(extension_loaded('domxml')); If it returns false, then you have to enable the domxml library. If you can modify php.ini, then locate a line extension=domxml.so (unix) or extension=domxml.dll (windows), uncomment it, then restart the web server. If you cannot find this line, then you may have to install this library, which is outside the scope of this question :) share|improve this answer answered Jun 28 '11 at 8:24 Benjamin 11.4
your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post:
Error On Line 2 At Column 1: Extra Content At The End Of The Document
click the register link above to proceed. To start viewing messages, select domdocument php the forum that you want to visit from the selection below. Results 1 to 6 of 6 Thread: Call php dom to undefined function domxml_new_doc() Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch http://stackoverflow.com/questions/6503465/call-to-undefined-function-domxml-new-doc to Threaded Mode 07-28-2011,06:19 AM #1 YourDirector View Profile View Forum Posts Junior Member Join Date Jul 2011 Posts 4 Call to undefined function domxml_new_doc() Hi everyone, I'm pretty new to PHP and completely new to the use of XML files. I am currently trying to create a document with the following code: PHP Code: http://board.phpbuilder.com/showthread.php?10380728-Call-to-undefined-function-domxml_new_doc() #0000BB">$doc=domxml_new_doc("1.0");
But it keeps on coming up with this error: Call to undefined function domxml_new_doc() in /homepages/29/d278322091/htdocs/inspire/addArticle.php on line 3 I have read on some forums saying that I need to check if the php_domxml.dll file is in the PHP directory but I'm not 100% what they mean by that. I'm hosted on 1&1 and have checked that it is currently running PHP5. Any help would be much appreciated. Thanks :-) Reply With Quote 07-28-2011,06:20 AM #2 YourDirector View Profile View Forum Posts Junior Member Join Date Jul 2011 Posts 4 Ooh, I must amend that and point out it is line 2 it is referring to as I removed: //create document root from the code Reply With Quote 07-28-2011,09:23 AM #3 johanafm View Profile View Forum Posts Senior
$root=$doc->create_element("article");
$root=$doc->append_child($root);
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create https://www.experts-exchange.com/questions/23526071/Fatal-error-Call-to-undefined-function-domxml-new-doc-in-var-www-vhosts-php-dom.html a Freelance Project Hire for a Full Time Job Ways to https://ubuntuforums.org/archive/index.php/t-1638752.html Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Fatal error: Call to undefined function domxml_new_doc() in /var/www/vhosts/ php dom Want to Advertise Here? Solved Fatal error: Call to call to undefined function domxml_new_doc() in /var/www/vhosts/ php dom Posted on 2008-06-30 PHP 2 Verified Solutions 2 Comments 2,387 Views Last Modified: 2012-06-22 how can i fix this problem for php info please look at this link http://www.koh-samui.com/phpinfo.php ini_set('display_errors', 1); require("phpajax_dbinfo.php"); // Start XML file, create parent node $doc = domxml_new_doc("1.0"); $node = $doc->create_element("markers"); call to undefined $parnode = $doc->append_child($node); // Opens a connection to a MySQL server $connection=mysql_connect (localhost, $username, $password); if (!$connection) { die('Not connected : ' . mysql_error()); } // Set the active MySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); } // Select all the rows in the markers table $query = "SELECT * FROM markers WHERE 1"; $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } header("Content-type: text/xml"); // Iterate through the rows, adding XML nodes for each while ($row = @mysql_fetch_assoc($result)){ // ADD TO XML DOCUMENT NODE $node = $doc->create_element("marker"); $newnode = $parnode->append_child($node); $newnode->set_attribute("name", $row['name']); $newnode->set_attribute("address", $row['address']); $newnode->set_attribute("lat", $row['lat']); $newnode->set_attribute("lng", $row['lng']); $newnode->set_attribute("type", $row['type']); } $xmlfile = $doc->dump_mem(); echo $xmlfile; ?> Select all Open in new window 0 Question by:
function domxml_new_doc() ivikasDecember 6th, 2010, 08:03 AMHi all, I am just starting google maps API tutorial at this link. http://code.google.com/apis/maps/articles/phpsqlajax.html But this piece of code is not working and i don't have an idea as how to install this extension in Ubuntu Lucid $doc = domxml_new_doc("1.0"); $node = $doc->create_element("markers"); $parnode = $doc->append_child($node); And i get an error like this when i run this script using php command line PHP Fatal error: Call to undefined function domxml_new_doc() in /var/www/googlemaps/phpmysql/phpsqlajax_genxml.php on line 3 It will be highly appreciated,if any one could tell me a way to install and use this extension. With Regards, Vikas Mohan roccivicDecember 6th, 2010, 10:45 PMUbuntu lucid ships with PHP5, but I see on php.net that domxml_new_doc() is a PHP4 function. Try googling: "domxml_new_doc() php5", maybe there is an alternative. Powered by vBulletin Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.