Restore Problem- M1.9.12 to M2.1.2

Restore Problem- M1.9.12 to M2.1.2

by Ravi Vare -
Number of replies: 12

Hi Moodlers,

OS- Windows XP

Server- XAMPP

I can't resore Courses to Moodle 2.1.2 (20111010) from Moodle 1.9.12+

Pl.see Screenshot

TIA

Ravi

Attachment restoring problem.JPG
Average of ratings: -
In reply to Ravi Vare

Re: Restore Problem- M1.9.12 to M2.1.2

by Colin Fraser -
Picture of Documentation writers Picture of Testers

First, currently restoring courses from v1.9.x is still problematic. It will restore Course materials but NOT User data. this is probably the underlying cause, but.. read on....  

Arrggghhhh Xampp....

<rant style="prejudicial">

WARNING: If you are too sensitive to criticisms of Xampp, please skip this paragraph.

Tools like Xampp are good for Windows local machines. For production servers, they are too restrictive. I cannot say for sure, yet I would suggest that the Xampp server is probably interfering with the Moodle backup process as well - but I do not know enough about recent releases of Xampp. I dumped it 2 years or more ago, I think, as I was having a lot of read/write and backup errors and PHP errors. I installed Apache, then PHP, then MySQL then Moodle, then phpMyAdmin and then other PHP applications. Since then I have had absolutely no issues with the server until I messed up an upgrade of PHP to update to Moodle 2.1. It was my blunder which was frustrating but easily fixed when I thought about it. I also found that if I do something to wreck my Moodle, (which I do occasionally, not always deliberately, but never maliciously..smile ), I can reinstall quickly and easily.    

RECOMMENDATION: Xampp should not be a preferred environment for a Moodle.

</rant>

I understand thaat the November release, v2.2.x(? maybe) will include the restore for v1.9.x User data. Patience, my friend...

Average of ratings: Useful (2)
In reply to Colin Fraser

Re: Restore Problem- M1.9.12 to M2.1.2

by Ravi Vare -

Hi Colin,

Thanks for response. this is very informative. i am following you through different threads. you have mentioned number of places about 'XAMPP'. Colin, Be frank, i am not very much technical person.(rather i am travelling same directionsmile...)so i am not so confident technically.

But i will try -> Install Apache, Php, Mysql, PhpMyAdmin separately.

i assumed that XAMPP bind them properly.

I waited this version 2.1.2 so much. I think i will get more stable version. In 2.1.1 'Restore' done properly.

BTW we will wait for 2.1.3. May Next Weekly release it will happensmile

Thanks again my friend.

Ravi

P.S.

In this backup- User Data is not there

In reply to Ravi Vare

Re: Restore Problem- M1.9.12 to M2.1.2

by Ravi Vare -

Hi Colin and moodlers,

I want to make discussion over following topic

LOCAL Server by

1) XAMPP

2) WAMP

3) install 'separately'

What are Advantages and disadvantages of each on

For this topic, Is this right forum ? (PL. Suggest)

 ----------------------

I try 'separately'

I installed Apache 2.2.21, Mysql,Php5.5.16,PHP 5.3.8 Successfully

But when i put Folder of phpMyAdmin in htdocs (webroot folder)

http://192.168.1.20/phpmyadmin/index.php

It can't open

I have given all permission to this folder.

Any idea?

TIA

Ravi

In reply to Ravi Vare

Re: Restore Problem- M1.9.12 to M2.1.2

by Mauno Korpelainen -

1) & 2) All kinds of AMPS (see http://en.wikipedia.org/wiki/List_of_AMP_packages ) are OK in local testing environment - they are easy to install and uninstall like explained for example in http://www.apachefriends.org/en/xampp.html

I use XAMPP for Windows all the time in my local PCs ( old XP, Vista and Windows7 ) for testing in different environments.

One disadvantage of AMP packages is that the default configuration may not be secure - see http://www.apachefriends.org/en/xampp-windows.html#1221 - and on production sites administrators need to know some basic things about changing different settings of database, php, apache and other parts of package anyway (in the long run...)

3) In this case you need to know what you are doing - or use google all the time to search answers to questions like why phpmyadmin does not work when installed separately smile So in a way it is a different learning curve to study and test how to set up different parts of web server but gives you more options to change and free hands to configure your production site for your needs.

Now this phpmyadmin issue:

Installer packages configure also phpmyadmin "automatically" but in manual install you need to read install guides and configure different applications separately. So you may need to open config.inc.php and add the necessary configuration options to be able to connect your database. See for example

http://www.bicubica.com/apache-php-mysql/index.php

or

http://www.phpmyadmin.net/documentation/Documentation.html#setup

The original problem (backup - restore from 1.9.12 to 2.1.2) may have nothing to do with your environment if the requirements of moodle 2.1.2 don't seem to cause troubles - debugging info shows some errors in restoring multichoice question type so my quess is that Tim Hunt could explain the source of this restore issue...

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

Re: Restore Problem- M1.9.12 to M2.1.2

by Ravi Vare -

Hei Mauno, Thanks for response.

Any folder inside 'htdocs' can't access.

I have given all permission to folder.

After so much digging/googling, i can't get any solutionsad

Actually, Phpmyadmin has 'SETUP' folder by which we can easily install it.

Let's see

 

Ravi

P.S.

http://www.bicubica.com/apache-php-mysql/index.php

Using this link, i have installed apache,mysql,php

In reply to Ravi Vare

Re: Restore Problem- M1.9.12 to M2.1.2

by Mauno Korpelainen -

How do you try to access htdocs? With http://localhost or with http://127.0.0.1 or with some other way?

When you install several versions of servers to one PC some strange things can happen if previous server files are not completely cleaned from different places of Windows folders and registers. If you check a file

c:\windows\system32\drivers\etc\hosts with text editor

does it contain any other code than

127.0.0.1             localhost

If your XP has difficulties with manual installs it might be easier to go back to installer packages like XAMPP - they can be uninstalled in a clean way with uninstaller script... manual installs require often installing/deleting of files and/or modifications to some system files/variables or copying of some files to Windows system folders etc - it can be a tought route...

Or the 3rd option which could be used as well - for example http://download.moodle.org/windows/ (complete installer packages)

In reply to Mauno Korpelainen

Re: Restore Problem- M1.9.12 to M2.1.2

by Ravi Vare -

Hei Mauno,

File 'Hosts' is perfect (Pl.see attached file)

i access Htdocs all the ways

(http://localhost/phpmyadmin  http://192.168.1.20/phpmyadmin)

----------------

Files in HTDOCS open properly. (test.php ;info.php)

But, when i put them in folder (say 'newfolder')

& Browse

http://localhost/newfoder/test.php OR http://192.168.1.20/newfoder/test.php

Then it says

'unable to connect'

I think it is issue of 'FOLDERs in htdocs'

-------------

We have option of XAMPP and WAMP. smile

But i want to prepare strong local server

Let's see

Ravi

In reply to Ravi Vare

Re: Restore Problem- M1.9.12 to M2.1.2

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

OK, so ignoring the off-topic and unhelpful rant ...

The problem is probably that your old 1.9 database has incorrect data in it, and that is breaking the restore 1.9 -> 2.1 code. Since it is not uncommon to have garbled data in old DBs, we need to make the upgrade more robust.

I suspect that questions that cause the problem will be found (in your 1.9 DB) by

SELECT *
FROM mdl_question q
LEFT JOIN mdl_question_multichoice qm ON qm.question = q.id
WHERE q.qtype = 'multichoice'
AND qm.id IS NULL

(that query should return no records). If you can move one of those questions to a course on its own, and so make a minimal back-up file that can reproduce this problem, that would be a useful starting point for fixing this.

In reply to Tim Hunt

Re: Restore Problem- M1.9.12 to M2.1.2

by Colin Fraser -
Picture of Documentation writers Picture of Testers

The trouble with the Xampp environment is that it creates an additional layer of complexity over the environment. This is, as I found out, not always a helpful thing to do and I resolved it by no longer using Xampp. While on that note, considering that a Xampp/Moodle installation is not recommended for production sites, for very obvious reasons, why does Moodle.org continue to support it? I do understand that not everyone has the time/skills to install, configure and maintain an AMP environmnent, but is that not a decision for them to make? Is adding and maintaining the Xampp/Moodle installer just tying up resources that can be used elsewhere? 

That is the point of my rant, Tim... Perhaps sooner or later, someone else might realise it as well. Reading Mauno's comments above, I suggest that it is step too far for someone with the time issues and interests he has, even with his great skills and knowledge.

And you are right, a closer analysis of the original error message would have revealed a problem, but I seem to recall that I had some difficulties with quizzes that seemed to clear up after dropping the Xampp installer, long before the introduction of v2. mmmm

In reply to Colin Fraser

Re: Restore Problem- M1.9.12 to M2.1.2

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

As I say, this is off-topic, but I am taking the bait.

All XAMPP is, is a quick and convenient way to install Apache + MySQL + PHP on top of any OS. As such, it provides a great way for people to get Moodle running on their own PC so they can test out new features, or, in my case, do developemnt. (Having started with XAMPP for Apache + MySQL + PHP, I then use symbolic links to link to all the copies of the code I have checked out from git.)

So the key here is conenience, which is what you want when trialling Moodle. What you want on a live system is stability and performance. That is why XAMPP is not suitable for production. But it is still basically Apache + MySQL + PHP, so Moodle will just work there. It doesn't cost us anything to 'support' it.

You have have had bad experiences in the past with XAMPP, but are you sure you diagnosed the problem properly?

In reply to Tim Hunt

Re: Restore Problem- M1.9.12 to M2.1.2

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Well yes and no, I think I did..smile After I had reinstalled several times, and the errors kept coming back, I just got tired of chasing my tail, doing the same things, doing different things, so I dumped Xampp and not had the same issues back. There were a range of issues, now this is on a local machine and I had not installed anything or changed anything, even many of the XP updates at the time were refused. I virus checked until I was sure that there was nothing there, I ran error checks and everything else and could not get to the heart of it. Dropped Xampp and have not had any issues with restores, or backups, quizzes, SCORM or multimedia, and once I sorted the forbidden word list, even TeX Notation has worked properly. All these things were not working in the Xampp installer, which suggests there was something in the environment that was causing the problem in its interaction with Xampp. Didn't know, give up.

Doesn't matter.. but the thing is I know that Xampp's use is limited, the Xampp/Moodle is more about ease of initial access than anything else. I would argue thought that if someone is familiar enough with Moodle to download and install the Xampp/Moodle, given the current, unbelievably narrow approach taken by Microsoft with regard to how they interpret user ability and knowledge, then why would they not use an AMP/Moodle rather than a Xampp/Moodle?

I suspect that, in this country at least, people who are are most likely to download and install the Xampp/Moodle no longer have time to learn to use it and will use their production sites, irrespective of suggestions not to, to develop things to try things. Or perhaps it is more accurate to say that the ready acessibility of the production site is a far more attractive option for them than to download, install and maintain a private Moodle. More likely, it is going to be Moodle Admins who will do this, but why would they want to use a Xampp/Moodle? Ergo... 

Anyway, interesting discussion and getting further off topic... smile