• Resolved kaplancreative

    (@kaplancreative)


    I have used your plugin on two non-rofit sites I manage; works beautifully. Kudos.

    But for a few weeks, working on a new client whose files live on a new (to me) host, keep getting zip errors; the zips are created and uploaded to my Dropbox, named correctly (themes, plugins etc), but the files are barely 150k so basically empty. Got fooled bad once already by this, restored blank Themes and Plugins backups and lost my entire theme/plugin install!

    All logs of attempted backups read alike… poking thru the long content see several messages pointing to the issue, but even with help from my host’s rep, haven’t been able to resolve. Here’s primary culprit, I believe:

    0002.628 (0) Closing the zip file returned an error (PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to open temporary file ‘pclzip-5440288bbd549.tmp’ in binary write mode). List of files we were trying to add follows (check their permissions).

    Core question: what subdirectory is UP trying to write the .tmp to? My host support folks asked me that, so they could check/fix permissions there if that’s the problem. Generally, all my WP folders are either 777 or 755.

    Already tried adding the define(‘UPDRAFTPLUS_NO_BINZIP’, true); patch to wp-config.php. Didn’t help. Thx for any guidance. Gotta get this sorted out to move ahead with site build!

    https://www.ads-software.com/plugins/updraftplus/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Hi,

    UpdraftPlus calls upon PclZip (in your case), and PclZip in WordPress is configured to use the root of your WordPress site for its temporary files.

    You can change that by defining PCLZIP_TEMPORARY_DIR in your wp-config.php.

    e.g. to cause it to use your uploads folder instead (which is usually writable, so a good choice):
    define(‘PCLZIP_TEMPORARY_DIR’, ABSPATH.’wp-content/uploads’);

    If you’re using UpdraftPlus on work for clients, then please do take a look at UpdraftPlus Premium – https://updraftplus.com/shop/updraftplus-premium/ – it’s only people buying the paid product that makes it possible for us to produce, or provide free support, for the free product, which we want to continue (so that e.g. non-profits like you’ve used it on can benefit).

    Best wishes,
    David

    Thread Starter kaplancreative

    (@kaplancreative)

    Clarification of above: Themes folder, Plugins folder are 775 permissions. But Updraft Plus’s subfolder is 755. Overall wp-content housing these is 775

    Thread Starter kaplancreative

    (@kaplancreative)

    Thanks. But hmmm. Just tried it and still have same issue. Correctly named zips are created (very very quickly), stored in UP and uploaded to DB, but they are essentially empty when unzipped – do not contain the actual files they should. Just a folder or two of … nothing.

    Would it help to share a full or partial log*? Best way to do that?

    *Lots of lines that show “on disk size:0kb” like this excerpt: 0002.601 (0) Zip: backup_2014-10-16-1620_(sitename} _cea77d4a6bcf-plugins.zip.tmp: 2500 files added (on-disk size: 0 Kb)

    (And yes, of course I will look into buying the Premium product. Still a semi-newbie at WP and building these sites as learning experience.)

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Hi,

    Best way to share a log is through pastebin.com.

    First, though, do confirm that the wp-config.php setting is in a place where it can take effect. Go to the expert/debugging tab on the UpdraftPlus settings, and click on the phpinfo link. Then scroll through all the defined variables (they are shown alphabetically, or you can search), until you find the PCLZIP_TEMPORARY_DIR define. If it’s not there, then it’s not been added to wp-config.php correctly. (The log won’t tell me this either way, so you need to check this).

    Best wishes,
    David

    Thread Starter kaplancreative

    (@kaplancreative)

    the PCLZIP_TEMPORARY_DIR does show up with specified path to /wp-content/uploads. so it’s properly defined in wp-config.

    Here’s full log from latest Backup attempt: https://pastebin.com/ZB0gGrhm

    (can I delete a pastebin once you’ve see it? don’t want it out there for the world; never used pastebin before)

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Hi,

    To be clear – what exactly is the value of PCLZIP_TEMPORARY_DIR shown? Just “/wp-content/uploads” and nothing more ? Or something else?

    I confess I’ve not used pastebin.com as a poster. So I’m not sure what buttons it gives you. I don’t believe, though, that UD log files contain anything that isn’t publicly discoverable on your WP website anyway.

    David

    Thread Starter kaplancreative

    (@kaplancreative)

    Here’s full line from variables list:

    PCLZIP_TEMPORARY_DIR /usr/local/apache/htdocs/thecenterforhealthenhancement.com/wp/wp-content/uploads

    I’ll suss out the pastebin deletion later; as you say.. nothing too revealing.

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    And, just to check – is that the real path for your uploads folder?

    If so, then you will need to ask your web hosting company about why there’s apparently no write permissions for WordPress to write there.

    You could also try:

    define(‘PCLZIP_TEMPORARY_DIR’, ABSPATH.’wp-content/updraft’);

    assuming that that’s where the internal UpdraftPlus folder is. You apparently do have permission to write to that.

    David

    Thread Starter kaplancreative

    (@kaplancreative)

    /usr/local/apache/htdocs/thecenterforhealthenhancement.com/wp/wp-content/uploads is the correct full directory path to /uploads. And I can drag things in and out of it freely via ftp; has 777 permissions, so isn’t that basically wide open?

    Just tried define(‘PCLZIP_TEMPORARY_DIR’, ABSPATH.’wp-content/updraft’); as an alternate – same outcome, same error.

    Is this for sure a permissions issue? Just poked around further up the chain… see that I have no permission to directly access /usr or /local or /apache in the chain. Can see contents of /htdocs, and noticed that /thecenterforhealthenhancement.com folder within has more restrictive read/write permissions (750), then folders within it.

    Thread Starter kaplancreative

    (@kaplancreative)

    btw: thx much for staying tuned to this. sorry to be handing you such a conundrum.

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    All we’ve really got to go on is the message returned from PclZip:

    0002.628 (0) Closing the zip file returned an error (PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to open temporary file ‘pclzip-5440288bbd549.tmp’ in binary write mode).

    So, it can’t open a temporary file. That might be because of permissions; it might be lack of disk space; it might be some other weird server quirk that I can’t think of. I think the best thing at this point would be to ask the web hosting company to take a look at the error message, and ask them for input.

    David

    Thread Starter kaplancreative

    (@kaplancreative)

    Right. Showed them the log and message before I reached out to you; but at that time we didn’t know where UP was trying to write the .tmp – now I know how to answer that question. Will pursue them and advise. Thx, Kirk

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Zip creation errors’ is closed to new replies.