Upgrading to 1.9.2 stalls

Upgrading to 1.9.2 stalls

by Steve Dale -
Number of replies: 21

Hi im upgrading Moodle version 1.9 + (Build: 20080507) (2007101509) to 1.9.2 (Build: 20080711) and th upgrade stalls on the Plugins check screen. Any ideas? Ive done 15 upgrades on same server without any problems! mixed

Average of ratings: -
In reply to Steve Dale

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

Maybe some files are missing and you could upload files of moodle 1.9.2 again...

Try to turn debugging to ALL from

Administration -> Server -> Debugging
Debug messages: ALL

or if you have no access to administration

try to add the following lines somewhere in the middle part of config.php

$CFG->debugdisplay=1;
$CFG->debug=6143;

to get some more info.

Check also folder upgradelogs inside moodledata folder...

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

Re: Upgrading to 1.9.2 stalls

by Steve Dale -
Nope sorry that didnt work either- can see debug report and only upgradelogs are from last upgrade to 1.9 Cant access admin or frontpage as taken straight to upgrade screen- Clicking no to upgrade has no effect!. Any other ideas?
Thanks
In reply to Steve Dale

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

At least you can try to clear browser history and cache, check again config.php (correct paths...), try to repair database (tables) with phpmyadmin, if you have access to server error logs check if there are any odd things, read http://docs.moodle.org/en/Installation_FAQ , restart server and check where the backups were...wink

And permissions of course - it looks like upgrading has not even started so permissions of subfolders of moodledata might be too tight.

If you can not see errors anywhere I would doublecheck that config.php is not pointing to one of those other 15 moodles and that server has not run out of memory - or that all files are in correct places (no blocks in mod mod folder etc)

Strange indeed...

In reply to Mauno Korpelainen

Re: Upgrading to 1.9.2 stalls

by Xiao-Ping Su -
Can anyone tell me how to do the update to 1.9.2 and still keep all of the plugins. I install lots of blocks and modules plug-in in moodle 1.9, but if I follows the instruction for update to 1.9.2( rename the current "moodle" folder to "moodel-save", then upload the "moodle" folder from 1.92 download, and copy the theme files, the installed plugin can not be copied, since files are spreaded in all different folders.) then I lose all of them.
In reply to Xiao-Ping Su

Re: Upgrading to 1.9.2 stalls

by Richard Enison -
X-PS,

Could you give an example of a plugin you cannot copy because it is in different folders? What are the pathnames of those folders, starting with "moodle-save/..."?

RLE
In reply to Richard Enison

Re: Upgrading to 1.9.2 stalls

by Xiao-Ping Su -

For example. I have installed "portfolio_block", "my_certificate" block, "Lecture_material" block etc, and "scheduler" as a module etc... when I install these blocks, I remember lots of them having files need to put into different folders, for example "lan" etc. so lots of them if only copy the folder from "Block" is not complete(when I did, some of the module name can not show up).  

So the first question, is how can I upgrade to 1.9.2 version and still keep all of my previous installed blocks and modules plug-in... I am doing like  this: rename moodle (1.9) to "moodle_save", then upload the 1.9.2 moodle to the server as "moodle", then I login as 'admin", I was asked for installation, and also ask for upgrade to the new version, and loading all of the features, it said that: those are not standard, and not in the disk, so I tried to copy the entire "Block" folder from  "moodle_save" to "moodle" (1.9.2), then there are some complains, saying two of the block file can not get string, I rename them, then I finished everythign, but all of my previous class material, like weekly lec hw, did not show up in the 1.9.2 version. so I went back to 1.9 older version... do you know how to keep the previous installed block and modules, (In our university, many of them like: thesis plan module, we also have lots student study plan input information...)

2nd question, is that, I have not suceeded in upgrading to 1.9.2 version, all of the previously uploaded weekly class material are all dispearing, everyclass does not show up the weekly listing, I used the same database, when I install 1.9.2. How can I make this work?

I really appreciate your answer and help! 

Susan Su (Tri-Valley University)

In reply to Xiao-Ping Su

Re: Upgrading to 1.9.2 stalls

by Xiao-Ping Su -

I am wondering is there another way to update ( am I doing the right thing? or not?), and keep all of the previous installed plug-ins and also data, the truth is, we have at least 30 plug-in installed, and I can not even remember all of them, like where each one located and the individual files, since when I install, I remember many of them have seperated files need to be put in different directory....

Do I need to reinstall if I upgrade to 1.9.2, but the curent plug-inhave many data in them... if I reinstall, we lost all the students datas.....

help!

Susan Su :  ssu@trivalleyuniversity.org

In reply to Xiao-Ping Su

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

Hi Susan,

in your case (update from moodle 1.9 to 1.9.2) it should not matter if you just upload new files (whole moodle 1.9.2 package) over old ones. Some rare cases like nwiki may cause problems - if you have installed nwiki the new package would install old wiki over nwiki files and mess up upgrading - still replacing files of old wiki with files of nwiki gets moodle back to order. Remember to take backups anyway...

If you change folder names you must remember to change paths in config.php and use admin/replace.php to replace the old paths in database with the new ones (or otherwise check/change old links).

In reply to Mauno Korpelainen

Re: Upgrading to 1.9.2 stalls

by Richard Enison -
MK,

I think you have missed the purpose of renaming folders when one upgrades Moodle. The folder containing the old Moodle files is renamed, then the new Moodle download is extracted to a new folder with the same name as the old Moodle folder used to have, precisely so it would not be necessary to change links in config.php and the database. If you don't rename the old folder, then you have to extract the new files to a folder with a different name, which would require changing the pathnames in config.php and the database (unless, of course, you overwrite the old files in the old folder as you suggest).

RLE
In reply to Richard Enison

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

Well...no, I have not really missed anything but it's good that you clarified things.

http://docs.moodle.org/en/Upgrade tells for example: "Do not overwrite an old installation unless you know what you are doing..."

I just told another way (that I nowadays usually use with generic packages) to upload all files of moodle directly over old files - overwriting the old files - because moodle 1.9 and moodle 1.9.2 have almost similar file structure - in Susan's case overwriting old files is reasonable and should not cause any harm. That's why the post started with

Hi Susan,

in your case...

For most cases upgrading with renaming folders to-and-fro is a better way - you must just remember to copy all (upgraded) non core activities and themes with new package...and whatever upgrading method is used backup of all files and database can save from unexpected problems. There is always a small risk that something goes wrong.

In reply to Mauno Korpelainen

Re: Upgrading to 1.9.2 stalls

by Richard Enison -
MK,

I think we're talking about two different things. I understand that you were saying that it was okay in SS's case (or XS's, depending on which transliteration of her name she was using) that she install the new Moodle scripts on top of the old ones, though in general that is a bad idea, because she was doing a minor version upgrade. No argument on that.

The issue is that, in the case where one does it the other way, the way she originally used, where one keeps the old files in their original folder and extracts the new ones to a new folder, renaming the old folder so that the new folder can be given the same name as the original name of the old one, does one have to change links? In the last paragraph of your previous post you seemed to be saying that if you use the folder renaming method, you have to change the links in config.php and the database. Perhaps I misunderstood what you meant by "If you change folder names".

RLE
In reply to Richard Enison

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

OK - no problem - maybe I said it unclear... thanks again for sharp notes, Richard  winkbig grin

In reply to Richard Enison

Re: Upgrading to 1.9.2 stalls

by Xiao-Ping Su -

Thanks you so much gentlemen for your replys...

To MK, thanks a lot for the suggestion, I have thought about to do it that way, to just upload the 1.9.2 moodle files into the 1.9 moodle floder with the same name, then all of the files with the same name will be upgraded and the installed plug-ins will remain the same... but I remember I also read somewhere saying that: is doing this way, it may not work... have you tried this method, and does it work, are you sure to upgrade from 1.9 to 1.92, can be done in this way without any issues... I just wish to smoothly make this transaction...

To RLE, you clarifiction is true, I think if I rename 1.9 moodle to "moodle-save" and upload moodle 1.92 as folder "moodle", I do not need to change the config.php file path... it is really too much work for me to copy all of the installed plug-ins.. I have not found the GUI feature you mentioned in our university's host server, automatialy copy files after a certain date. the multiple files, for example:

Example  1:  mod-tutorial module, "tutorial" was put into "moodle/mod/tutorial" and anothe file " tutorial.php" was put into "moodle/lang/ es_utf88/tutorial.php".

according to the installation guide:

 Example 2: another plug-in I instaled, I did the folwoign: according to the install instruction:

Unpack the zip file ( structure ):

    - cms_plugin
        - cms
        - course
        - blocks
        - lang
        - admin

   and copy directories cms, course, blocks, lang, and admin into your $CFG->dirroot
   (means same level for example blocks and message directories are).

   Backup your /index.php, /admin/site.html and /course/lib.php files.

   Copy /index.x.x.php ( where x.x is representing your Moodle version )
   over your existing index.php. Copy /admin/site.x.x.html over your existing
   /admin/site.html file and copy /course/lib.x.x.php over your existing /course/lib.php
   file."

Example 3 Another certificate blocks installation, I did the following:

"Upload the certificate_report/root/certificates folder to your root (your main moodle) folder.
Upload the certificate_report/blocks/my_certificates folder to your moodle/blocks folder."

Example 4: anothe example the module called allmyGrade, when I install, I modifie many files,

Include install instruction here:
(1) Extract all files from this zip file

2) Edit the file grade/allmygrades.php using something like Wordpad

Replace the rootmysqlusername and rootmysqlpassword entries (localhost will normally be ok for database location, but may need an IP address instead) with your relevant details on the following line:

$con = mysql_connect("localhost","rootmysqlusername","rootmysqlpassword");

Replace the moodledbname entry with your moodle databasename on the following line:

mysql_select_db("moodledbname", $con);

Save allmygrades.php

2) Copy the edited file allmygrades.php, to the following location:

moodle/grade/allmygrades.php

3) Edit the following file: moodle/grade/index.php

Scroll to the bottom of the file and look for the following line of code:

print_footer($course);

Immediately before this line, copy and paste in the following line of code (changing it slightly to fit the address of your site):

Print "<a href=http://www.southampton-city.ac.uk/moodle/grade/allmygrades.php target=_blank>All My Grades(across all my courses)</a>";

So it is so complicated to copy all of the files, and I do hope I can make the 1.92 version work as it ws before, without losing all of the inputted data...

Thanks a lot for help!

Susan

In reply to Xiao-Ping Su

Re: Upgrading to 1.9.2 stalls

by Richard Enison -
SS,
  1. Now that you have provided more info on the pathnames of folders used by plugins, I see that they are indeed scattered all over the file system, not all under one main folder that could be copied across from moodle-save/blocks/name-of-block to moodle/blocks/name-of-block (for example). It would be good if the installation procedure for these plugins included a standard way of keeping track of the pathnames of all the folders they use (and which files in those folders, if they are sharing an existing folder like lang/es_utf8) in a text file, so that the text file could be used by a php script, batch file (for Windows), or shell script (for Linux) to automatically copy all those files at upgrade time.
  2. What I had in mind about copying folders by date, first of all, doesn't apply, because not all the files used by a plugin are in subfolders of one main folder for that plugin. But it would have worked something like this. On my PC, for example, using Windows Explorer ("My Computer" is the same thing), I can open a window for a folder (like blocks) and select Details view, then click on the Date Modified column heading to sort the list by date. Then I can easily use the mouse to select the files (or subfolders) that are more recent than a particular date, since they are all consecutive on the list. Finally, I can copy that group of files or folders to another folder, either by dragging to another folder window, or using the Copy and Paste commands on the Edit menu, etc.

    Whether this can be done with a remote Windows server is less clear, and with a Linux server, even less (to me). I know one can produce a directory list in date order with the "ls -t" Linux command, or "dir /od" for Windows. I guess the best way to do it with a remote server of any kind, if you have ftp access, is to use a good gui ftp client program on your workstation that will let you sort and copy files on a remote server as one would in Windows Explorer on a local Windows machine.
  3. As for MK's suggestion of installing on top of the old files, perhaps he knows for sure that this is safe for the minor version upgrade of 1.9 to 1.9.2. All I know is that it is less likely to cause problems than a major upgrade like 1.8 to 1.9 or 1.9 to 2.0. And that is one reason why it is always a good idea to back up your site before upgrading.
RLE
In reply to Richard Enison

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

Everything you said, Richard, is correct.

For 3.) - Just for fun I have both test server and local PC where it is easy to test upgrading etc (and I do it almost daily). Many files have been changed, many bugs fixed and some new features added from 1.9 to 1.9.2 so I checked again the difference with Winmerge ( http://winmerge.org/ ) this morning and overwriting leaves from first moodle 1.9

8 old help files to folder lang/en_utf8/help/grade/:

aggregation2.html
enableajax.html
grade.html
gradecategory.html
gradeexceptions.html
gradeletterdefault.html
itemname.html
showquickgrading.html

and files

mod/glossary/check.gif
search/Zend/Search/Lucene/EncodingConverter.php

and folder

search/lang

that could be deleted but they do not take much extra space and do not cause trouble. If there are no core hacks (that would vanish) and no NWiki installed overwriting is fast and easy. Finally I tested it with local test moodle - everything ran smoothly.

Still as a general rule it is better to upgrade as Richard told you.

In reply to Mauno Korpelainen

Re: Upgrading to 1.9.2 stalls

by Xiao-Ping Su -

MK;

Thanks a lot for the update, so for sure, that will work...

The only thing I am wondering is that, you know that some plugin I installed, for example the login-file, involving lots of modificaiton of the files, do you think that will work? But this is actualy a general issure, for upgrade, I mean I change partial of the files, if I updated to the new version, means the news version will overright the previous changed ones....

In reply to Xiao-Ping Su

Re: Upgrading to 1.9.2 stalls

by Mauno Korpelainen -

The biggest problem with overwriting is that IF you make hacks to core files (those files that come with normal moodle package) you must do the same changes again. But using old hacked 3rd party activity files that replace core files is not good either because they may not work anymore if developers make some major changes to those files.

If you are uncertain you could try that Winmerge (if you are using Windows) and open the old moodle folder and the new package and see the differences row by row, file by file, folder by folder side by side for those files that you have edited. Most files have small changes like version has been changed but in some cases (particularly in moodle 2.0) the whole structure of files and functions may have changed. The less you have 3rd party activities the less you have problems with upgrading...

And if something goes wrong and you have those backups from moodledata, moodle and database or at least course backups it is always possible to get old moodle back - or even better to test upgrading with another moodle with same data before the final upgrading.

Example

In reply to Xiao-Ping Su

Re: Upgrading to 1.9.2 stalls

by Richard Enison -
X-PS,

I asked you for an example of a plugin with the pathnames of the folders it is in starting with "moodle-save/...", so that I could see where these folders fit into the file structure. Instead, you have given the name of one folder (lan). From that I cannot tell where this folder lan is. For that matter, you haven't said which block or module (since you named several) puts some of its files in this folder called lan. So I can't help you.

However, I would say this. Copying the entire block folder (with all its subfolders, sub-subfolders, etc.) would not work because that would include all the standard blocks that come with Moodle. Thus you would be overwriting the new version of the standard block files with the old! The same thing is true of the mod folder, where all the modules (standard and non-standard) are. Instead, I would copy the folder of each non-standard block and module. The easiest way to do that, I think, is to make a listing of the block folder (likewise the mod folder) in date order, and copy all the subfolders with dates more recent than the date of the old version of Moodle. In most GUI systems this can be done in a single action with the mouse (or even the keyboard).

I was interested in seeing whether the folders where the files of these non-standard blocks are located are in fact under the main folders of these blocks, but from the info you gave I cannot tell.

RLE
In reply to Mauno Korpelainen

Re: Upgrading to 1.9.2 stalls

by Neil Thomas -
HAve made changes to config.php and then found that a number of paths are wrong - written in capitals rather than lower case. E.g. CAS in the auth.php file and am now stuck on the path '/HTML/QuickForm/DHTMLRulesTableless.php' which I cannot find anywhere.

Having spend all day trying to get this version to work, I am very tempted to go back to 1.9.0 -at least it installed correctly.

Neil Thomas
In reply to Neil Thomas

Re: Upgrading to 1.9.2 stalls

by Richard Enison -
NT,

Your report of the problem is incomplete and therefore hard to follow and confirm. For example, you say some paths are wrong. Where? In what fie? We need the full pathname of a file (starting with the main Moodle folder (directory)) because there are multiple files with the same name. For example, you mention auth.php. Every subfolder of the folder auth has a file by that name. I presume you were talking about auth/cas/auth.php. You said there was a problem with them being in capitals instead of lower case, for example, CAS. Well, there is a folder named CAS (in all capital letters). It is a subfolder of auth/cas, i.e., it is auth/cas/CAS. And it contains a file called CAS.php, i.e., auth/cas/CAS/CAS.php. This has been true for as long as I can remember.

As for /HTML/QuickForm/DHTMLRulesTableless.php, it is in lib/pear. That is not too surprising, since the include_path that I usually see in error msgs. in these forums includes pear. But you didn't even mention any error msgs. You haven't given us a clue as to why you were even trying to find /HTML/QuickForm/DHTMLRulesTableless.php. If you got an error msg., you are more likely to get help, and get it more quickly, if you post it in its entirety.

EDIT: And btw what changes did you make to config.php and why did you make them? If you change dirroot and/or wwwroot and do it wrong, that can cause lots of problems.

RLE