DavidMJ wrote:
$zip_read is not defined, ever.
a typo. should have been zip_read (no $).
DavidMJ wrote:
Outside of that, the entire approach to zip is just bad. It takes many assumptions and does not even consider the fact that we have a fully working zip class written in PHP and available to every installation
i use a unified approach for flat (uncompressed), zip, bzip and gzip files. i don't believe one could readily do that with the zip class, and i don't see any reason to.
the whole "zip" part was just a whim. since the current code does not support zip for backup, the simplest thing would be to just remove the parts dealing with it in the restore.
DavidMJ wrote:
$reminder? What's this? Never defined...
that was another typo. it should have been, of course,
$remainder
DavidMJ wrote:
The backup system has significantly matured over releases, much of it's code is known to be good.
i did not touch the backup code.
the
restore code is far from being "mature" or "good". the only thing known about it is that it often fails with timeouts. (it doesn't even test for results or handles errors in any way)
the approach of reading the whole backup file into a single variable in memory, and then throwing this variable around creating multiple copies (up to 4 copies of the whole files are created every time), is just a toy. it breaks as soon as the database grows above 1/4 of available physical memory, and on the way to failure, it may choke the host to death.
i did not expect you to take my code "as is" and put it into olympus without any modifications or testing, but it does supply a working example of one way to get the job done.
leaving the existing "restore" part of the code in place means, practically going out without a working backup/restore system.