Zips issues in Backups

Zips issues in Backups

by Jonny McCullagh -
Number of replies: 2
I'm using Moodle 1.5.2 + (2005060222) and I am trying to backup a course but when I try to restore it onto a Moodle 1.5.3+ (2005060230) I get the following error:

PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

I then tried adding the path to 7-zip in Admin -> Configuration i.e. C:\Program Files\7-zip.7z.exe but when trying to make the backup I now get an error as follows:

Zipping backup
Warning: exec(): Unable to fork [cd 'D:\data\moodledecaf\temp\backup\1147777606' &'C:\Program Files\7-Zip\7z.exe' -r 'D:\data\moodledecaf\temp\backup\1147777606\backup-quality-20060516-1206.zip' 'moddata' 'moodle.xml' ] in D:\Websites\LocalUser\decaf_Admin\lib\moodlelib.php on line 5916

Copying zip file
An error occurred while copying the zip file to the course directory

Has anyone got any ideas? I have searched these forums but they are a little short of solutions. I would prefer not to install extra software - is it just this particular build of Moodle?
Thanks in advance for any help,
jonny
Average of ratings: -
In reply to Jonny McCullagh

Re: Zips issues in Backups

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Jonny,

I'm not really sure if 7-zip is compatible, in terms of parameters and so on with the original info-zip utilities. They are available in: http://www.info-zip.org/pub/infozip/

Just install them, configure your "zip" and "unzip" variables and everything should work...

Also, about the "Unable to fork" error, take a look to this. I'm not a Win32 expert but perhaps it could help: http://www.php.net/manual/en/ref.exec.php#64534

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Zips issues in Backups

by Luis de Vasconcelos -

One way to fix the "unable to fork" problem is to copy the cmd.exe file into your PHP directory. This way you don't have to give the IUSR account read and execute permissions to the original cmd.exe file in the \Windows\System folder, which is not good practice as it opens up a security hole on the server.

However, I'm still trying to determine if there are any negative implications to copying cmd.exe to the PHP directory, so treat this advice with caution!