Moodle

Fatal error: Call to undefined method domdocument:load() when extension=php_domxml.dll is loaded

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.6, 1.9.2
  • Fix Version/s: 1.8.7, 1.9.3
  • Labels:
    None
  • Environment:
    OS: MS Windows Xp
    XAMPP 1.6.7
    extension=php_domxml.dll loaded
  • Database:
    Any
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Fatal error: Call to undefined method domdocument:load() in \lib\xmldb\classes\XMLDBFILE.class.php on line 85

/// Create and load XML file
$parser = new DOMDocument();
85-->> $parser>load($this->path);

This error is shown when extension=php_domxml.dll is loaded

In mdl 2.0 \lib\xmldb\xmldb_file.php on line 85

Activity

Hide
Todd McCaffrey added a comment -

I'm seeing this when trying to install Moodle 1.9.2 under WAMPP on a Vista installation. I have successfully installed both Joomla and Wordpress on the same machine.

Show
Todd McCaffrey added a comment - I'm seeing this when trying to install Moodle 1.9.2 under WAMPP on a Vista installation. I have successfully installed both Joomla and Wordpress on the same machine.
Hide
Matt Clarkson added a comment -

I suspect that loading php_domxml.dll in your php.ini is the cause of this problem. Try to disable it and see if that helps.

There are two very similarly named extensions, dom and dom_xml - the dom extension is built into php5 and loading the dom_xml extension (designed for php4) will override the default extension.

Show
Matt Clarkson added a comment - I suspect that loading php_domxml.dll in your php.ini is the cause of this problem. Try to disable it and see if that helps. There are two very similarly named extensions, dom and dom_xml - the dom extension is built into php5 and loading the dom_xml extension (designed for php4) will override the default extension.
Hide
Todd McCaffrey added a comment -

Yay! Frabjous joy and marvelous day!

Matt, you nailed it in one (of course, I had to reboot)!

The installation went through snappo and I'm now trying to figure out what the heck to Moodle (all local, at first, naturally).

Now... the question is... does this become a XAMPP (specifically WAMPP) bug? A PHP bug? A new
check in the Moodle installation script? All of the above? Something different?

Certainly, short term, it'd be great if someone added a note to the WAMPP installation to point this out.

Long term, why do the PHP guys still include the dom_xml extension in PHP5?

Show
Todd McCaffrey added a comment - Yay! Frabjous joy and marvelous day! Matt, you nailed it in one (of course, I had to reboot)! The installation went through snappo and I'm now trying to figure out what the heck to Moodle (all local, at first, naturally). Now... the question is... does this become a XAMPP (specifically WAMPP) bug? A PHP bug? A new check in the Moodle installation script? All of the above? Something different? Certainly, short term, it'd be great if someone added a note to the WAMPP installation to point this out. Long term, why do the PHP guys still include the dom_xml extension in PHP5?
Hide
Eloy Lafuente (stronk7) added a comment -

Hi, now we check for proper (new) DOM extension in Moodle using:

if (extension_loaded('dom') && method_exists(new DOMDocument(), 'load')) {

That way (if the 'load' method is present) we know it's the new DOM extension and can validate XMLDB files properly.

Fixed in 18_STABLE, 19_STABLE and HEAD. Will be available in next weekly builds.

Especial thanks to Dariem Garces and to everybody else, ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi, now we check for proper (new) DOM extension in Moodle using: if (extension_loaded('dom') && method_exists(new DOMDocument(), 'load')) { That way (if the 'load' method is present) we know it's the new DOM extension and can validate XMLDB files properly. Fixed in 18_STABLE, 19_STABLE and HEAD. Will be available in next weekly builds. Especial thanks to Dariem Garces and to everybody else, ciao
Hide
Todd McCaffrey added a comment -

Thanks Eloy, you rock!

Show
Todd McCaffrey added a comment - Thanks Eloy, you rock!
Hide
Dongsheng Cai added a comment -

Verified, closing, thanks

Show
Dongsheng Cai added a comment - Verified, closing, thanks

Dates

  • Created:
    Updated:
    Resolved: