Help with updating moodle

Help with updating moodle

by Alan Kan -
Number of replies: 9

Hello. This error occurs when I try to open one of my courses on my moodle website. As I understood from some posts, I need to update my website. However, I am not sure how to do it safely and afraid that everything could be deleted. If anyone can help me, please let me know. I am not so good in moodle platform and it would be great if you describe everything in details (how to make a backup of everything etc.) Thank you!

Stack trace:

  • line 397 of /lib/setuplib.php: coding_exception thrown
  • line 355 of /lib/accesslib.php: call to default_error_handler()
  • line 1097 of /lib/modinfolib.php: call to has_capability()
  • line 1072 of /lib/modinfolib.php: call to cm_info->update_user_visible()
  • line 327 of /lib/modinfolib.php: call to cm_info->obtain_dynamic_data()
  • line 1260 of /lib/modinfolib.php: call to course_modinfo->__construct()
  • line 1000 of /lib/completionlib.php: call to get_fast_modinfo()
  • line 47 of /report/progress/lib.php: call to completion_info->get_activities()
  • line 2629 of /lib/navigationlib.php: call to report_progress_extend_navigation_course()
  • line 1254 of /lib/navigationlib.php: call to global_navigation->add_course_essentials()
  • line 3043 of /lib/navigationlib.php: call to global_navigation->initialise()
  • line 781 of /lib/pagelib.php: call to navbar->has_items()
  • line 4 of /theme/anomaly/layout/general.php: call to moodle_page->has_navbar()
  • line 768 of /lib/outputrenderers.php: call to include()
  • line 715 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 232 of /course/view.php: call to core_renderer->header()
 I have no idea what this means so any help you can give me is appreciated.

Average of ratings: -
In reply to Alan Kan

Re: Help with updating moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yep, be cautious.  Make sure to do a backup following the Moodle docs.  Try reinstalling the backup, just to make sure it is good and you know how to do it.

However, before doing any of this, let us know about your server environment.  It might be something simple.

In reply to Rick Jerz

Re: Help with updating moodle

by Alan Kan -

Thank you very much for your reply. I am using mySQL database. However not sure how to access it, because I didn't create this moodle website.

In reply to Alan Kan

Re: Help with updating moodle

by Colin Fraser -
Picture of Documentation writers Picture of Testers

erm,.. what Rick was getting at was what is your server type, and what version of Moodle do you use? Windows or Apache server? Hosted or self-hosted? Do you have access to the directory tree, that is, the raw code of your Moodle? Some things need be done differently if you have complete access to your Moodle or not. To upgrade your Moodle is a lot more simple than you may think. 

Moodle has three parts, the code base, which is really the version of the Moodle you are using, the database, created when the Moodle was first installed and updated every time the codebase was updated, the moodledata folder where internal resources, images, uploaded files (usually) and so on are stored.  You won't damage anything if you follow the simple guidelines to upgrading, and taking your time to get it right. Check, if you can, and make sure that the Moodle code directory and Moodledata directory are on the same level in the tree before doing anything else. If so, and they should be, read on, if not, then you have another issue to deal with  

For example, if you have complete access to your code base, then you can upgrade your Moodle by copying out your config.php file, download the latest stable version of the code, unzip or untar it, then deleting all your current Moodle code and copying the unzipped, or untarred code into the directory root of your deleted Moodle, copy back your config.php file and open the new Moodle, let it upgrade everything it needs to do.    

If you do not have access to your codebase, then you need to talk to the people who do and find out from them what you need to do. 

What I would recommend to anyone new to Moodle admin is that you create a server environment on a stand alone desktop or a laptop and practice things. Try things out on that before touching your production site. It is a little more work, but the reward is that if you make a mess of something, then your local Moodle is easily replaced, but your production site is a lot more work. Practice things and see how easy it is when you do them on your production site, with less chance of error.  

The error has occurred on this line: 

  • line 397 of /lib/setuplib.php: coding_exception thrown
So if you have access to the code, go and find that php file in the /lib/ directory, see what line 397 is about. From memory, I suspect that is indicating your Moodle hasn't been updated for a while and the changes in the interim are likely too great to do in a one step upgrade. You may have to make it a two stage operation. So what version of Moodle are you using, and what are you trying to update to? 



In reply to Colin Fraser

Re: Help with updating moodle

by Alan Kan -

probably I am using Moodle 2.3.4+ (Build: 20130208). I want to update my website on whatever build, because when I click on one of my courses following error occurs: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error. After a few minutes of googling I understood that it might happen because the website is outdated and I need to update it. I've never worked with moodle before and one person asked me to fix it. Thank you! I really appreciate your response. It is very important for me.

In reply to Alan Kan

Re: Help with updating moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Be prepared to spend some time on this, especially if you do not understand your web server or moodle.

What versions of php and mySQL are you running?

Do you have all of the required php extensions turned on?

What is your toolset and knowledge with these: Linux, FTP, SSH, Linux editors?


In reply to Rick Jerz

Re: Help with updating moodle

by Alan Kan -

Here is everything about the server.

No, I don't have knowledge and editors. Thank you very much


234
In reply to Alan Kan

Re: Help with updating moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Okay, this is helpful.  It appears that your moodle is running, at least for you to get to this point.  I am not a "server" or "coding" person, so I am not sure when your errors (that you initially report) happen.

From the environment report, your version of php allows you to only run up to 2.6, from what I can see.

At this point, I am not sure what to suggest to you.  Who manages your server, and what do they think?  I am not sure if your skill level is good enough yet to manage a new installation on your server, just to see if 2.6 will run.  How many courses are in your current moodle, and might you be able to consider starting from scratch?

In reply to Rick Jerz

Re: Help with updating moodle

by Alan Kan -

Seems like person who managed this server dissapeared or doesn't want to help anymore and thats why one person asked me to do something with it. I've never worked with moodle platform before and I think that my skill level is not enough to manage new installation. If it is dangerous, I won't probably do anything. Unfortunately, one of the courses will stay unfixed. Overal thank you. I really appreciate your help.

In reply to Alan Kan

Re: Help with updating moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Here's a suggestion for you.  If you see yourself being involved in Moodle, you can experiment on your own by getting a free course on MoodleCloud.  You basically create an account for yourself, and you add up to 50 students on it, if you wish.  There are some other limitations, too.  But the advantage of this alternative is that you are guaranteed that your Moodle will work.

Then, as you learn more about moodle, you can decide if, and how you might want to invest in a bigger Moodle site.

Also, hanging around here on Moodle.org will give you an appreciation of what it takes to manage a moodle site.  This "education" will only cost you your time.

Good luck to you.  Sorry I could not be of more help.