Upgrade from Moodle 2.4.4 to 2.5 hangs

Upgrade from Moodle 2.4.4 to 2.5 hangs

by g k -
Number of replies: 19

When attempting to upgrade from 2.4.4 to 2.5, the upgrade hangs on the  "/moodle/admin/index.php?confirmupgrade=1&confirmrelease=1/"  page. 

After the intial upgrade page (the page warning you that the server is about to be upgraded to the latest version) the intall moves to the "server check" page.   All appears to be ok except one php extension setting (intl) .   After clicking on "continue" the install hangs.   (The site is in debug mode, but it does not allow for any messages. Backspacing the page only causes the the site to go back to the initial upgrade page.  It produces no error logs on the server. Any ideas would be appreciated. 

Average of ratings: -
In reply to g k

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ken Task -
Picture of Particularly helpful Moodlers

You've not mentioned anything about the specs of your system or if it is remotely hosted or not (shared or dedicated) nor how one is doing the upgrade, soooooo ....

When it was on 2.4 did you check server environment for compat with 2.5?  http://site/admin/environment.php?version=2.5

check apache error logs for clue (and any other logs your system might keep).

Might have to resort to turning on debug via config.php file.

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by g k -

Thank you for your help. There are no server errors. This is a shared remote server (Linux/CentOS)  I tried to upgrade by unzipping the moodle2.5 file, renaming the moodle folder, copying over the existing config file and visiting the admin page. The site was in maintenance/debug mode.  I pretty much followed the same process I always have. All environment settings are now OK.

 

In reply to g k

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ken Task -
Picture of Particularly helpful Moodlers

For one: If hosted on a Linux box, why would you download the .zip?  There's a tar.gz download available also.  That download IS for Linux.

Assume you ftp'd the files up to server (shared host).  Did all the files xfer?  Did you change permissions/ownerships on the files after uploading?  When moving a copy of the config.php file from the old site did permissions get changed on the config.php file?

Since you are remotely hosted, some hosting providers require one to have either php.ini's or .htaccess files to get Moodle to function.  Did you have any of those in the old site?  Did you copy them over to the new site?

There is one slight requirement change (seen on the downloads page) - 2.4.+  PHP 5.3.2 (min).  2.5 min PHP 5.3.3.  Some hosting providers also provide different versions of PHP.

One still might have to take the debug lines from config-dist.php flie and add to config.php file to get anything to show in the install phase.

And apache logs or any other error logs to which you have access showed absolutely nothing?

Hmmmm ... wonder if the install script for the 2.5 requires more memory that your account will allow.  Some hosting providers have their systems set such it just kills any script over max ... doesn't log or report anything back to browser.

'spirit of sharing', Ken

 

In reply to Ken Task

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by g k -

Well, the tar files don't extract from the cpanel for some reason.  So I've always extracted the zip files without a problem. Every version of moodle I have ever run on this server has been extracted from zips.   PHP 5.3.2 is running on this server. In any case, the environment check indicates that all is well as far as running Moodle 2.5 is concerned. I have the option of 5.4. I'll experiment with this.   I've increased the php memory to 2048 M from 32M. The execution time = 3600.  Site5 doesn't seem to require htaccess or phpini to function.  I remember creating these after I already had a moodle site up and running.  

In reply to g k

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ken Task -
Picture of Particularly helpful Moodlers

https://download.moodle.org/

tar.gz 30.3 MB zip 38.6 MB
Hmmmmmm
One could download .tar.gz, uncompress locally, re-zip … upload their own smaller/meant for Linux zip and unzip.  OR just upload all the files/folders from the extracted .tar.gz into the appropriate folder of Site5 in binary mode.  Set/check permisions, etc.

Too bad your hosting provider can't give you a more modern tool for a Linux system.

2.5 Requires: PHP 5.3.3,
2.4 Requires: PHP 5.3.2

http://docs.moodle.org/25/en/Upgrading_to_Moodle_2.5

Site5 KB
http://kb.site5.com/php/how-to-increase-the-memory-limit-in-php/
Notice: While we don’t have a technical limit on how high you can set the php memory limit, we highly recommend that you not exceed 128M.

http://kb.site5.com/control/siteadmin/siteadmin-how-to-check-the-default-version-of-php/

Have ssh into server?

Run the upgrade via command line:

cd moodlecode/admin/cli/

php upgrade.php [ENTER]

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

Hi,

I'm having similar problems with two sites.  Firstly I have 2.4.4 on a shared Linux host running PHP 5.3.22 and MySQL 5.5.30.  I have uploaded the .tgz and expaned it successfully, but it goes to a white screen after agree to Upgrade.  I have also tried installing 2.5.0 as a fresh install - same thing, it just hangs.

I also have 2.4.4 on my XP pc (and yes, I did use the Windows version for this one !) for local testing.  It won't upgrade to 2.5.0 nor install as a fresh install.  Exactly the same problem - hangs with a blank white screen.  I have tried increasing the memorylimit to 100M but no difference.

I'm completely new to Moodle and while I'm happy to edit PHP files, my programming skills end there !

Any and all help appreciated.

Many thanks

Ray

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by David Keenleyside -

I have replicated this problem on our production server at Glenfield College.  The white screen is generated when apache experiences a SIGSEGV fault, which causes it to create a core dump and terminate.

The cause of the crash is the php script running out of memory, and in our case it was set to the default of 128MB in the php ini file.  After we adjusted this figure to 256MB the upgrade proceeded smoothly after that.

Personally I suspect it was simply the sheer size of the database, and other factors, that consumed the memory during the upgrade process.  Now, I know this won't help those of you with hosts that have a strict memory limit on the PHP script you are allowed to run, but you could have a go at running the update on a local machine and uploading the results to the host [after doing your backups, of course].

In reply to David Keenleyside

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

My db is quite small so I don't think that's the issue.  My host people put the memory up to 300MB but that didn't work either.

Firefox times-out at EXACTLY 120 secs even though I've set the keep.alive up to 300 secs.

IE times out at 60 secs.

By increasing my php.ini (on my pc) to 300 secs my localhost 2.5 went in. I just can't updrage online.

Thanks for the suggestion though.

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

Hi again,

I've taken a crash course in PuTTY and tried to do a CLI upgrade.  This is what I get in response :

 cli]$ php upgrade.php
!!! <p>Error: Database connection failed</p>
<p>It is possible that the database is overloaded or otherwise not running properly.</p>
<p>The site administrator should also check that the database details have been correctly specified in config.php</p> !!!

Config.php is correct and the db runs fine using 2.4.4.  What could be wrong do you think ?

Thanks in advance.

Ray

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ken Task -
Picture of Particularly helpful Moodlers

@Ray

Crash courses are always interesting ... ;)  But, ya got a good start!  Congrats.

Maybe you already checked this ... 2.5 requires MySQL 5.1.33.

mysql -V or mysql -h [hostseeninconfig] -V

should show version

The config.php file contains a DB user, the DB and the mysql server (DB host) to which Moodle is to connect.

So let's try another command to test that:

mysql -h [hostseeninconfig] -u [userseeninconfig] -p[userseeninconfig]

There is no space after the -p - that's not a typo.

Also this command:

php -r "phpinfo();" | grep memory_limit

If one cannot find any info, might contact the helpdesk of your hosting system and give them details.  You might be on a shared system that cannot support/won't support 2.5.

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

Hi Ken,

Many thanks for the reply. 

PHP is 5.3.22

MySQL 5.5.3

Memory_limit = 256 MB

when I entre any mysql command I get  "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)"
It is a shared system but it does support 2.5.  They were able to install it using softaculous, as can I. But once it goes past the environment check it halts.

Thanks again

Ray

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ken Task -
Picture of Particularly helpful Moodlers

It customary for hosting providers to use dedicated servers for DB servers - the DB's reside on another machine.  So localhost won't work - no mysqld (server) running there.  Have to use an IP address which will use the TCP/IP socket.  Ask provider.

Now you say they can install via script - guess that means only 2.4.  Ask your provider, if you yourself cannot see apache error logs, to check out the error logs for your site.

'spirit of sharing', Ken

 

In reply to Ken Task

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

Yes I believe the dbs are where I can't get at them except through MyPHPAdmin.

No, they they got 2.5 up and running.

2.4.4. is running with $CFG->dbhost    = 'localhost';

and


$CFG->wwwroot   = 'http://xxxx.ie/moodle2.5/moodle';
$CFG->dataroot  = '/home3/xxx/moodledata;
$CFG->admin     = 'admin';

The host techies are VERY helpful and trying things from their end now.  Will let you know what develops.

Thanks again

Ray

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by g k -

Well, I raised the memory limit that a script may consume in my php.ini file to 256. Initially, I noticed no change. I also noticed that I had 2 php.ini files.  I am not sure why.  I had one at the public_html folder and one at a level higher.  I redownloaded the latest version of 2.5 and tried to installed again and for some reason, the upgrade worked.  I really can't say for sure if it was the new download, the change in the php.ini or both. I'd say it's worth trying. (I edited the php.ini file at the highest level (root).

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ken Task -
Picture of Particularly helpful Moodlers

@Ray

Others have had issues with installing 2.5.0 ... note the .0.  What build do you have?

Moodle 2.5+ (Build: 20130524) Version 2013051400.02 has been released.  Wonder if getting the latest and greatest build files will resolve the problem.

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

You might be right.  I'll try later and let you know.  Notice the "+" only requires php 5.3.2 where ".0." needs 5.3.3.  Odd !

Thanks

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

No joy I'm afraid. I still get cannot get 2.5 to access db.  I even tried install.php as opposed to upgrade using a blank db.  Still the same error msg.  It would seem to me  that 2.5.0/+ does not like mysqli for some reason.

What was interesting was that I ws able to install 2.4.4 via CLI.  Well almost, for some reason it wouldn't accept the bd pass at the command line.   Any ideas on that one ??  Couldn't find anything about that on the forum.

Might just have to wait and see what percolates down from the good developers.

Thanks again

Ray

In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Ray Di Mascio -

Ok, here’s my solution - effective but not pretty !

The problem seems to be with Moodle updating the database so I started with a blank db (remembering to set the char set to utf8). I then created a blank course and Restored my course into it. I also had to upload my Private Files again.

Finally I had to recreate the users passwords and hash them into the new db as Moodle saw them (the users) as being imported from another site. The question still remains as to why there was conflict in updating the db. I tried Importing the data into the blank db but that threw up an error about duplicate primaries.

As I run two identical sites – one for testing updates etc. – it will be interesting to see if the next version will update 2.5+ politely.

Thanks to all those out there who shared.

Average of ratings: Useful (1)
In reply to Ray Di Mascio

Re: Upgrade from Moodle 2.4.4 to 2.5 hangs

by Andre Kruger -

Had a similar issue, everything worked fine after I made the chnage to the php.ini and increased the memory limit to 256mb.

 

Thanks for everyone's help.