Migrated to another server - "Incorrect pool file content"

Migrated to another server - "Incorrect pool file content"

by Robb Allen -
Number of replies: 3

I have a Moodle 2.2.4 (Build 20120706) site that I've migrated from another host to my own hosting service.  PHP and MySQL versions are the same as was on the other host.  The site loads fine, I can log in (both as admin and as a student), but when I try to launch a SCORM module, nothing loads.

So, I thought that maybe I needed to reassociate the SCORM package with the course lesson.  In trying to do so, I get this message:

Incorrect pool file content 28f94930acdd9a6dbf5dbda5c230aa0934a5abb9

So, I thought that maybe the database needed updating to indicate the proper path to the moodledata folder.  I ran /admin/tool/replace/index.php and replaced the old path with the new one.

The same behavior occured.  The SCORM package doesn't load and if I try to reassociate it, I get the error above.

The SCORM package is located in a folder under the "repository" directory of moodledata (same as when the site was hosted with the previous host).

Any help you can give would be greatly appreciated!

Robb

Average of ratings: -
In reply to Robb Allen

Re: Migrated to another server - "Incorrect pool file content"

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Robb,

The 'Incorrect pool file content' message is generated by a file_pool_content_exception being thrown. This exception is only thrown in four places in Moodle:

  • twice in add_string_to_pool
  • twice in add_file_to_pool

In both cases, it's only generated the file has incorrect file content.

I've moved Moodle file content between machines numerous times without any issue. You shouldn't need to run the replace tool either.

At a guess, and given the locations that these exceptions are generated, I would guess that your data copy is broken in some way.

The only way to fix it is to take a new copy of all of the moodledata.

How did you make your original copy?

Since Moodle 2.0, the moodledata directory is organised by unique hashes. A checksum is created for each file. The file is then renamed to that checksum and placed within the directory structure. For your file, the checksum (or hash) is 28f94930acdd9a6dbf5dbda5c230aa0934a5abb9. Therefore it will be found in:

moodledata/filedir/28/f9/28f94930acdd9a6dbf5dbda5c230aa0934a5abb9

Each hash is theoretically unique and you shouldn't get two files with the same hash.

I'd advise using something like rsync -avi SOURCE DEST. This should overwrite the broken content. Any content you've added since then should not be affected as the hashes should be different too.

As ever, always read the manual before taking a command like the above from a forum and make sure you fully understand the consequences.

Andrew

Average of ratings: Useful (1)
In reply to Andrew Lyons

Re: Migrated to another server - "Incorrect pool file content"

by Robb Allen -

Thanks for your assistance, Andrew.

I don't have access to use rsync between both servers.  So, what I did was deleted the file in the filedir directory and then relinked to it from the file repository.  It seemed to work in terms of letting me relink without giving the "Incorrect pool file content" message.  Images are no longer broken and places I've put links to download .zip files within courses now work.

However, SCORM packages still don't load.  I even tried re-uploading the original SCORM 1.2 zip file and re-linking.  I just get a blank screen when launching the SCORM package.  Do you have any idea on what I can do to resolve this issue?

Thanks and Happy New Year!

Robb

In reply to Robb Allen

Re: Migrated to another server - "Incorrect pool file content"

by Robb Allen -

PROBLEM SOLVED - When I downloaded the files for our site from our current host, I FTP'd them to my Windows 7 machine, then uploaded them to our new host.  There must have been some permission issues somewhere.  The host provided me a .tar.bz2 file containing the moodledata folder.  I downloaded it directly to our new host via SSH, unpacked it, and everything works fine now.

Average of ratings: Useful (1)