Error when setting up the database

Error when setting up the database

by Scott Karren -
Number of replies: 19
All

I am using Xampp 1.6.7 to install the 1.9.1 version of moodle on my laptop. when it gets to setting up the database I get "

Fatal error: Call to undefined method domdocument::load() in C:\xampp\htdocs\moodle\lib\xmldb\classes\XMLDBFile.class.php on line 85
'

Any ideas on what is causing this?

Scott Karren


Average of ratings: -
In reply to Scott Karren

Re: Error when setting up the database

by Mauno Korpelainen -

4 moodlers have asked the same question during the last week so obviously the problem is in Xampp installer itself and the solution is:

You need to comment (add ; before) the extension for domxml  in php.ini - or actually BOTH of the php.ini files in XAMPP:

[path to xampp folder]/php/php.ini
and:
[path to xampp folder]/apache/bin/php.ini

;extension=php_domxml.dll

Average of ratings: Useful (1)
In reply to Mauno Korpelainen

Re: Error when setting up the database

by Scott Karren -
Such a simple answer for a frustrating problem. Thank you Mauno for your quick, correct, and concise answer.

Scott Karren
In reply to Mauno Korpelainen

תשובה ל: Re: Error when setting up the database

by Irith Herman -

hi

i have the same problem

but i did not  understand from the answer what and where i have to add

thanks irith

In reply to Mauno Korpelainen

תשובה ל: Re: Error when setting up the database

by Irith Herman -

hi

i have the same problem

but i did not  understand from the answer what and where i have to add

thanks irith

In reply to Irith Herman

Re: תשובה ל: Re: Error when setting up the database

by Richard Enison -
תשובה ל,

It depends on whether you have your own server and therefore you have access to php.ini, or whether you are using a commercial web host that you share with many other clients (more likely). See http://docs.moodle.org/en/Installation_FAQ#System_information_needed_for_Installation_Forum.

In the latter case, the host has its own php.ini file that applies to the websites of all its clients, and is therefore inaccessible to the clients. You might be allowed to override some of the settings in the common php.ini file for your site only, by using an .htaccess file (only if the web server is Apache) or by creating a custom php.ini file. Contact tech support to find out which of these methods you can use, and how.

If you have your own server, see http://moodle.org/mod/forum/discuss.php?d=94601#p417895 on how to find the location of your active php.ini file. Then search for "extension=php_domxml.dll" in that file and put a semicolon in front of it. This file will probably be in the bin subdirectory of the apache subdirectory of your main xampp directory (where you extracted the files to from the file you downloaded). MK suggests doing the same in the php.ini file in the php subdirectory of your xampp directory, probably because it is used when you run PHP in cli mode for the cron script.

RLE
Average of ratings: Useful (1)
In reply to Richard Enison

תשובה ל: Re: תשובה ל: Re: Error when setting up the database

by Irith Herman -

hi

thank you but it didnt help

ifound the file and  changed but nothing happened

irith

In reply to Irith Herman

Re: Error when setting up the database

by Richard Enison -
אירית הרמן,
  1. Are you sure you found the active php.ini file? With PHP 5 or higher there is only one (at a time).
  2. You still haven't said whether you have your own server or are sharing one. In my last post I gave you a link about how to describe your server environment for this forum. You are more likely to get relevant help if you follow it.
  3. KR reminded me: whatever changes you make to php.ini won't take effect until after you restart your web server!
RLE
In reply to Irith Herman

תשובה ל: Re: תשובה ל: Re: Error when setting up the database

by Irith Herman -

When I restarted my laptop and then went back to Moodle the changes had resolved the problem and Moodle went through its setup paces perfectly.

Greatly appreciate the help

irith

In reply to Richard Enison

Re: תשובה ל: Re: Error when setting up the database

by Kay Rennie -

I too have this problem and have tried the edits you suggest but not getting anywhere. I'm currently using localhost. Is their something else I should do in this case?

Thanks

Kayren

In reply to Kay Rennie

Re: תשובה ל: Re: Error when setting up the database

by Kay Rennie -

Success!

When I restarted my laptop and then went back to Moodle the changes had resolved the problem and Moodle went through its setup paces perfectly.

Greatly appreciate the help!

Kayren

In reply to Mauno Korpelainen

Re: Error when setting up the database

by Isha Nunkoo -
Mauno,
Thanks so much for all your helpful replies. I owe you a lot!
Isha
In reply to Isha Nunkoo

Re: Error when setting up the database

by Matt Molloy -

Mauno and RLE,

Once again, you have both come up with the goods!

I had been trying to install xampp and Moodle on a Mac, ran into snags, and posted to the forums. RLE replied with possible solutions. Due to pressure of time, I had to abandon the Mac, and set everything up on a Windows box (I'm more familiar with Windows).

Ran into this glitch with Windows, but a quick search on the forums led me directly to this discussion, and my problem was solved.

Many thanks to you both,

Matt

In reply to Matt Molloy

Re: Error when setting up the database

by Ger Tielemans -
It is NOT the solution for people who want to use the domxml, and it only happens in a fresh install, not when you upgrade an existing database on the windows/xampp platform!
In reply to Ger Tielemans

Re: Error when setting up the database

by Mauno Korpelainen -
In reply to Mauno Korpelainen

Re: Error when setting up the database

by Ger Tielemans -

This domxml package is no longer supported sad

But you made me think about a workaround.. smile

Uncheck the package, install fresh database, recheck domxml .. works!!

(I now only wonder why this works smile)


I now get during a notifications-call the message:

 Enabling the PHP setting display_errors is not recommended on production sites because some error messages may reveal sensitive information about your server.

(Moodle makes that by default YES (on the server>>>debugging page)

In reply to Ger Tielemans

Re: Error when setting up the database

by Ger Tielemans -
..OOPS not working:
  • Doing a new notification with extension=php_domxml.dll switched on is NOT working. (gives you a blank screen)
  • And the display_errors = on is also set in php.ini (Moodle cannot overrule this..)
In reply to Mauno Korpelainen

Re: Error when setting up the database

by Phill Pover -
Thanks for that, glad I didn't have to look for that myself. Just setting up my test server before I build the live server next week for precisely this reason.

Thanks again

-Phill
In reply to Phill Pover

Odp: Re: Error when setting up the database

by Nina Radczyk -
It helps me too(first I restarted my laptop)

Thanks!
In reply to Mauno Korpelainen

Re: Error when test connect to database

by Quy Nguyen -
hey guys,
i did all the setup steps successfully,but when i test database connection, i received the message :

Warning
: mssql_connect() [function.mssql-connect]: Unable to connect to server: localhost in D:\xampp\htdocs\test.php on line 2
Could not connect

i tried to resolve this problem but not looks like it's a problem specific to MSSQL 2005!