Testing 1.8 on Moodle for Windows

Testing 1.8 on Moodle for Windows

by Chardelle Busch -
Number of replies: 8
Picture of Core developers
I just upgraded my local testing install to 1.8 through cvs (head). I'm getting this error message on all pages:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


End tag 'body' does not match the start tag 'div'. Error processing resource 'http://localhost/'. Line 260, Position 3

ÿþ 

I have no idea where this problem might be. I'd rather not to a new install--can anyone tell me if there are some files I need to get from the new 1.8 package--or what's going on?

Thanks
Average of ratings: -
In reply to Chardelle Busch

Re: Testing 1.8 on Moodle for Windows

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This only happens if you have the Server -> Debugging -> Debug messages set to DEVELOPER level.

One of the things that was done for 1.8 was to make all the HTML code in Moodle XHTML strict. To help developers achieve this, when Moodle is running DEVELOPER level debug messages, it serves the pages in a way makes the web browsers check that the page is well-formed XML, and if not display an error. This makes it very easy to find and fix lots of problems with the HTML, which is a good thing. However, it makes it impossible to do anything else until you have fixed the problems, which is sometimes annoying.

So if you have a custom theme, or other custom code, you need to fix it to only produce valid XHTML.
In reply to Tim Hunt

Re: Testing 1.8 on Moodle for Windows

by Chardelle Busch -
Picture of Core developers
Thanks so much for the explanation Tim!

Note to self: turn debugging off before upgrading.
In reply to Chardelle Busch

Re: Testing 1.8 on Moodle for Windows

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Except that if the upgrade fails, you want to have debugging on, so you get more detail about what has gone wrong!

To fix you install, try going into your database and changing the mdl_config table. In the row with name debug, set the value to 2047.
In reply to Tim Hunt

Re: Testing 1.8 on Moodle for Windows

by Chardelle Busch -
Picture of Core developers
Well, that might have worked except..... I shut things down, was logged out, then couldn't even log back in to get to the db sad. So, I just did a complete new install.

I do have another question about the Windows install--it looks like curl is required to test the networking, but it hasn't been included in the package. The instructions look a bit complicated (http://us2.php.net/manual/en/ref.curl.php),
is curl going to be added to the Windows package?
In reply to Chardelle Busch

Re: Testing 1.8 on Moodle for Windows

by Daniel Moree -
by default, curl is included in the php package. If you downloaded PHP from the PHP site and added it to you Apache setup, all you have to do to use curl is open your php.ini file. Do a find/search and search for extension=. Find the line that says extension=php_curl.dll and uncomment it, remove the ; before it.

Typically your PHP.ini file will be located in C:\php, C:\php(VERSION), or if you used a third-part installer, it might be located in C:\program files\php, c:\program files\Apache group\apache2, or some form of that. But by default, all PHP packages include curl, it is just not enabled by default. If you search your computer for PHP.ini, you might be able to find it faster, then just follow the above steps to enable curl.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Testing 1.8 on Moodle for Windows

by Martín Langhoff -
+1 on what Tim says, and I'd like to add something...

In the quest for valid XHTML, having debugging errors printed to the browser breaks XHTML, and JS and a few other bits and pieces. So there was a point in early 1.8( and all earlier moodle versions) where if you had a perfectly valid XHTML page, but there was a warning from the code, the XHTML broke.

This makes it impossible to run with debugging on in any useful shape or form sad , so I've added a config switch (debugging_display I think) that makes moodle avoid this toxic mix of HTML and errors, and only send the XHTML to the browser, and the errors to the error log. So in 1.8 to be monitoring for errors you have to be looking at Apache's error log (on linuxes, use tail -f /var/log/apache/error.log ) or at the Event Log if you are using IIS.
In reply to Martín Langhoff

Re: Testing 1.8 on Moodle for Windows

by Chardelle Busch -
Picture of Core developers
Daniel,

Thanks! That was easy--I've added the instructions to the docs page that the error message goes to: http://docs.moodle.org/en/error/mnet/nocurl

Martin,

I'll see how the display debug message display works--I'm not sure I'll remember to look at the logs though smile.
Average of ratings: Useful (1)