500 internal server error when migrating a 1.9 environment to a new server

500 internal server error when migrating a 1.9 environment to a new server

by Matthew Whelan -
Number of replies: 3

I am attempting to migrate a 1.9 Moodle to a new server to perform a test upgrade. However, I am receiving a 500 internal server error. What is odd however, is that when I first finished moving the files, the site loaded half way, and then I receive the 500 error after that. I've provided pictures to show. If anyone could help me figure out a way around this, it would be greatly appreciated. 


Edit: Here is the information in my error log: 


[19-Jun-2014 14:09:52 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0

[19-Jun-2014 14:09:52 UTC] PHP Warning:  require_once(/lib/setup.php): failed to open stream: No such file or directory in /home/xxx/public_html/moodledev/config.php on line 23

[19-Jun-2014 14:09:52 UTC] PHP Fatal error:  require_once(): Failed opening required '/lib/setup.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxx/public_html/moodledev/config.php on line 23

[19-Jun-2014 14:13:56 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0

Attachment OgError1.png
Attachment OgError2.png
Average of ratings: -
In reply to Matthew Whelan

Re: 500 internal server error when migrating a 1.9 environment to a new server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There's 4 minutes between the fatal error and the final warning. Assuming your page didn't take 4 minutes to load can we ignore the fatal error (something you fixed)?

It's telling you that the extension for memcache can't be loaded. This probably means what it says. You have configured your system to us memcache but the PHP extension isn't installed on your system.

In reply to Matthew Whelan

Re: 500 internal server error when migrating a 1.9 environment to a new server

by Ken Task -
Picture of Particularly helpful Moodlers

+1 to what Howard has already said ... but 2 more cents ...

What's your upgrade plan?   One cannot 'hyperjump' from 1.9 to 2.3,.4.5.6.7.   Think beginning .6 memcache was an option with 2.7 it's almost required (at least it's checked for exsistance on the system).  

The advised migration path is 1.9.x to highest 1.9.19.   Then 1.9.19 to 2.2.highest.  Then 2.2.highest to 2.7?   Personally, I'd upgrade the current 1.9.x via git to 1.9.19.  And continue using git to upgrade to 2.2.highest ... then march it trough EVERY one of them ... 2.3, 2.4 ,2.5, 2.6 via git (might consider holding at that point).  Once on a version 2, the git upgrades done via the command line and using scripts found in /moodlecode/admin/cli/ takes very little time.

Reason for the march ... in 2.3 there was change to assignment mod.   A new one was introduced.   Tool in the Site Admin menu upgrades all of those.   Same thing with quizzes/test.

If you catch errors early in the migration process something might be done about them before moving forward.   Moving forward without fixing could mean more guruish fixes or loose of data ... or no fix.

'spirit of sharing', Ken

In reply to Ken Task

Re: 500 internal server error when migrating a 1.9 environment to a new server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The MUC appeared in 2.4.

If you have fast disks then you can safely ignore it. If you have slow disks (e.g. on NFS or a nasty VM) then you can't. You would know if it's wrong - page load times will be in seconds regardless of load.