Can't Backup or Restore Couses - I'm Screwed - Courses Start Today

Re: Can't Backup or Restore Couses - I'm Screwed - Courses Start Today

by Rich Schumaker -
Number of replies: 0
I remembered that Hostgator upgraded its servers in July and they may have not set something right on the PHP or made some other change that is impacting it.

I put in the following support ticket:

I have a Moodle installation on my site at [site info deleted here]. Moodle is an open source learning management system that is available through the Fantastico scripts or via download. In June, we performed backups of all of our courses without incident. However, our server was upgraded in July and when we recently attempted to do backups or restores, Moodle did not function properly.

After further investigation of the problem, it turns out that the $_POST array is not being populated, resulting in a redirect to the course list at line 73 (or so) in backup.php. We don't know whether this is a Moodle issue or server/hosting issue at this point.

However, the only quick-fix workaround we could come up with is to change all of the "post" references to "get" in the following files (located in rlsei.com/academy/backup):

backup_check.html
backup.php
restore_form.html
backup_form.html
restore_check.html
restorelib.php

The question, we have is, when the server was upgraded, were there any changes to the php or other functions that may be preventing the POST array from being populated? Could you please check the php settings to make sure that any scripts used during the upgrade functioned properly and all of the php settings are set properly. I would appreciate any suggestions that you might have to correct this issue.

I got the following response:
The simple issue is that the server did work a bit differently before the upgrade and hence the backups made before this upgrade are not directly compatible with the server in it's present state. You may get the backups to work with some finessing but they will definitely not work out of the box. As far as specifics 90% of any issues with the backups will be from permissions. Also many controlling variables that were delegated by htaccess before must now be dealt through php.ini files. It is possible to adapt the backups mostly by changing the permissions.
So I followed up by saying "When you say "it is possible to adapt the backups mostly by changing the permissions", do you mean the course backups that are done within the Moodle software? That is where we are having the problem, not with general backups." and I received the following comment:
The $_POST array should not have changed at all with the migration to suexec. I will investigate further to make sure $_POST variables are actually passing correctly (they may not be due to the compilation or version of PHP we have installed) and I will update the ticket when I find a definitive answer. In the meantime the $_GET workaround you mentioned should suffice well.
I am waiting for the next response and I will post it.