Need to turn off zlib compression for it to work

There was a problem when trying to execute backup. I needed to turn off zlib compression for it to work.

Latest WP (single) & snapshot plugin
Fresh install

    Arun Basil Lal
    • 1
    • #29,162

    Hey becky,

    Did you get any error messages when compression was on? Are you using any plugins to enable zlib compression?

    Let me know!


    Hi Arun,

    I enabled it in php.ini. Had to turn it off, then the plugin works. The log shows zlib compression was the issue. Not sure if the plugin can be amended to allow zlib to be on simultaneously.

    In addition, perhaps to include instruction to deny from all in .htaccess file to avoid backup being downloaded by other people. the current htaccess only turned of indexing. users can then download the file through ftp instead of direct link - probably more secured that way.

    Would this work with multi db?


    Hi Becky, I wanted to jump into this thread to get some more details on the zlib compression issue.

    The log shows zlib compression was the issue.

    Any chance you can provide full details on the exact error you were seeing in your logs regarding the conflict? I know under my own test environments I have zlib enabled and have had any issues creating a snapshot.

    In addition, perhaps to include instruction to deny from all in .htaccess file to avoid backup being downloaded by other people

    I'll try and include that in the next release of Snapshot. The snapshot plugin simply creates the .htaccess file is not present. You can feel free to edit these to your own needs to allow/deny for any variations to suite your own needs. Each user's case will be different. Also, via the Settings panel you can move the Snapshot folder outside of your web site environment. This would be the most secure. But if you do that you will no longer be able to download the files via the Snapshot interface. Which I'm guessing your already understand.

    The plugin should work well with the multi-db plugin installed. The plugin does proper switching of multisite environments and uses the $wpdb object for all database access.


    Becky, Also would be helpful to know what version of Apache, PHP you are running as well so I can try to reproduce this issue on my end for determining a work around. Thanks.



    2012-04-08 03:20:32: init
    2012-04-08 03:20:32: memory_limit=[256M] memoryLimit=[256M]
    2012-04-08 03:20:33: table: wp_commentmeta segment: 1/1
    2012-04-08 03:20:33: Unknown: errno:8 ob_end_flush(): failed to delete buffer zlib output compression. /home/user/public_html/wp-includes/functions.php on line 3335

    That error came about 3 times (I tried 3 times) before I disabled zlib compression. After I have disabled zlib, executed the 4th time, it worked. not only that, the other 3 backups appeared too in the _backup folder (i.e backup/_backup folder), whereas the 4th backup file appeared in my backup folder.


    Apache version 2.2.22
    PHP version 5.2.17
    MySQL version 5.1.56

    My current install is a single site WP, not multi site.


    Forgot to mention - great plugin :)

    I am using this to create a demo site - easy to restore to original state without having to go into phpmyadmin.

    Would be great if I could include a function to auto restore every 24 hours or something like that :)



    Thanks for the error details. Last night I was able to reproduce this error under all my test environments. Today will be packaging a beta version. Can I ask you to test this under your system when ready? would appreciate the confirmation you are able to create a snapshot with compression turned on.

    As for the restore every 24 hours or some interval I'll add this to the feature request listing. Since we are doing backups on an interval I don't see why this would not be possible. Similar logic and all. And sort of makes sense. I've run some public beta site for clients before and sometimes you just want to reset things to clear out the dummy content everyone has entered.




    Thanks very much Paul. Let me know when it's ready. I can test it on one of the demo sites. Cheers.



    I just did a quick test on a same set up. Backing up went well. But I can't restore the tables with zlib compression on. It just got stuck at restoring the 1st table.

    When I turn off zlib, it restored properly.



    Thanks. I had not 'fixed' the restore processing code. Was trying on set of changes at a time. Will apply the same patch to the restore code. Look for a new beta in a few.



    Great job :) Works perfectly.

    On the feature request, on top auto restore at certain intervals, would be great have a widget to show a countdown clock before the demo site is restored, if the auto restored option is selected.

    Thanks very much. Well done :)


    Thank Becky, Glad to hear we have solved this for you and other users. Closing this for now.

    Will add the feature request to the list. Might be a while. Have some other requested features in the works like files (themes, plugins, media) included in the archive.


    Keep the good work. Cheers.

Join 368618 happy members

Get access to our entire collection of epic plugins, astonishing themes & genius support

Become a member