Restore eating < and > from HTML tags?

Restore eating < and > from HTML tags?

by Stephen Edwards -
Number of replies: 17
I am using Moodle 1.4.3+ (dated 1/9, IIRC), and am getting ready to start a new semester. For some course sites that we want to reuse, I thought I'd use backup/restore to make a new copy for the new semester. I backed up (without student data), then restored to a new course.

Everything worked as I expected, except that virtually everything--assignments, resources, labels, etc.--that had html in it was restored with all of the < and > characters stripped! Yes, I mean that if I edit any resource/assignment description/week summary/etc., it is still edited in HTML mode (originally created using plain web forms, not the HTML editor) and has exactly the same ASCII contents as before, but with all the < and > characters removed. Needless to say, this makes things completely unreadable when rendered.

Does anyone have any idea what might cause this behavior, or how I can fix it?
Average of ratings: -
In reply to Stephen Edwards

Re: Restore eating < and > from HTML tags?

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Stephen,

we had detected such problem in "Spanish Course". After some checks we detected that every moodler with problems were running PHP 5.0.3. Is this your case?

If so, please downgrade your PHP version to 5.0.2. There is a serious bug in 5.0.3 producing such "eating of tags". I hope it will be solved in next PHP 5.0.4 release because the bug seems to be fixed and closed.

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Restore eating < and > from HTML tags?

by Stephen Edwards -
Thanks for the reply. Our server is indeed running PHP 5.0.3. I'll have to check and see if our sysadmin's will roll that version back for us.
In reply to Eloy Lafuente (stronk7)

Re: Restore eating < and > from HTML tags?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Eloy & Stephen,

This is to confirm that the bug "eating of tags" reported in PHP 5.0.3 has been corrected in PHP 5.0.4-dev, which I have installed & tested.

You can download it at http://snaps.php.net/

All the best,

Joseph_R

In reply to Joseph Rézeau

Re: Restore eating < and > from HTML tags?

by Frank Eccles -

Thank you for this info regard php 5.0.3 I also had the problem have reverted back and now do not have the problem backed up restored no problem.

Thanks again for the tip.

In reply to Joseph Rézeau

Re: Restore eating < and > from HTML tags?

by Ernesto Gaston Pacheco -
Thanks this solved the whole problem, besides there is no  PHP 5.0.4-dev yet in www.php.net only  PHP 5.0.3-dev (which still has the bug).
In reply to Eloy Lafuente (stronk7)

Re: Restore eating < and > from HTML tags?

by John Hobson -

Hi Eloy

I am experiencing this with trying to restore to my ISP who is in the process of upgrading to PHP 5.0.2 (not 5.03!!!).

Actually I did the restore at a time when they were supposed to be reverted to V4  (they are in testing phase) but I am not sure ;-( I need to check exactly which version is current and I wont get a response until Monday)

Anyway it is either PHP Version 4.3.1 or 5.0.2 that is giving the problem.

As I can't control my ISPs upgrade timing / version is there any other solution to this?

Regards

John

In reply to John Hobson

Re: Restore eating < and > from HTML tags?

by John Hobson -

Oops!!

I have now done some more checking and found that my ISP is telling little white lies wink

They have in fact upgraded to 5.0.3 according to PHP info in control panel.

I am obviously in the same boat as the rest here, then. Shame that I don't control the paddle ;-(

Is the problem limited to restore? If I could somehow get the course files up would it run OK on 5.0.3?

John

In reply to John Hobson

Re: Restore eating < and > from HTML tags?

by John Hobson -

And now my ISP has reloaded 5.0.2 and it restores just fine!

(execpt of course for the winks wink which always end up hard coded and so have red Xs - I think this is a bug !)

J

In reply to Eloy Lafuente (stronk7)

Re: Restore eating < and > from HTML tags?

by Chris de Kok -
Hi,

The server over here is running PHP 5.0.4 and the restore function is still eating the > and < !

It isnt fixed in PHP 5.0.4 ? Or am i doing something terribly wrong here?

- Chris  -
In reply to Chris de Kok

Re: Restore eating < and > from HTML tags?

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Chris,

I'm running 5.0.4 (MacOS X) and I'm not experiencing such problem at all. Can you send any example of your problem (backup file, screenshoot...) and additional info like OS, Moodle's version...

And, of course, check again that you are running 5.0.4! wink

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Restore eating < and > from HTML tags?

by Chris de Kok -
Hi Eloy,

I wanted to make an example for you but it seems the restoring works fine now wide eyes...

I don't know who, where and when but it works.

Thanks for your reaction anyway,

- Chris -
In reply to Stephen Edwards

Re: Restore eating < and > from HTML tags?

by reg phenna -
I have the same problem but I am not sure how to change my version of PHP?
I have apachiefriends xampp installed on my server so not sure how to change it.
Could anyone help with that one?

Thanks
In reply to reg phenna

Re: Restore eating < and > from HTML tags?

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Reg,

you will need an older version of XAMPP (containing PHP 5.0.2). Trying to change individual components could be terrible!

Ciao smile

PS: Perhaps you could use this Moodle4Windows package. Now it's updated to Moodle version 1.4.3 and it uses XAMPP with PHP 5.0.2. If you haven't too much in your current personal server (such package isn't recommended for production servers but for personal use!), you could install it and then move the old database and moodledata dirs to their new location (or use the backup/restore feature to move between servers).
In reply to Eloy Lafuente (stronk7)

Re: Restore eating < and > from HTML tags?

by reg phenna -

In the end I found a batch file that comes with XAMPP that you run to switch from PHP5 to PHP4.

It now works fine

Thanks

Reg

In reply to reg phenna

Re: Restore eating < and > from HTML tags?

by Aileen Pranoto -
Hi, can you tell me which file that I must run in order to switch from PHP5 to PHP4? Pls, help me...
Thank you very much
In reply to Aileen Pranoto

Re: Restore eating < and > from HTML tags?

by Sean Tierney -
It is in the default installation of XAMPP. the batchfile is in the root directory and called phpswitch.

Follow the instructions 9type 4 to revert to php4)

Worked a treat for me - after a lot of headaches.

I guess i should have searched the forums before i tried to solve these problems myself!!

But why have all my tables defaulted to centre justified???
ST