WordPress.org

Ready to get started?Download WordPress

Forums

Cannot automatically upgrade plugins (36 posts)

  1. jamesisin
    Member
    Posted 5 years ago #

    I am not able to upgrade plugins automatically:

    Downloading update from http://downloads.wordpress.org/plugin/user-photo.zip

    Unpacking the update

    Incompatible archive: PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file 'C:\WINDOWS\Temp\wpu6500.tmp'

    I am running WP 2.5.1 with IIS, MySQL, and PHP 5.

  2. jamesisin
    Member
    Posted 5 years ago #

    Yeah, just in case anyone was wondering--still not working. However, the error message is different since the upgrade to 2.6.2:

    Downloading update from http://downloads.wordpress.org/plugin/user-photo.zip

    Download failed.: Could not create Temporary file

    Installation Failed

  3. iridiax
    Member
    Posted 5 years ago #

    Maybe the problem is just with this particular plugin? I had one plugin that wouldn't auto upgrade and it was due to an error (since corrected) by the plugin maker.

  4. jamesisin
    Member
    Posted 5 years ago #

    I don't think that's the case. It has the appearance to suggest a permissions issue, but I'm really just guessing.

    I have kept an old version of a plug-in I'm not actually using around for this (User Photo 0.8.0.2).

    Does anyone have an old version of a plug-in I could test this with, test an auto-upgrade? I don't keep the old ones.

  5. iridiax
    Member
    Posted 5 years ago #

    If other plugins auto upgrade and one doesn't, then it is likely a problem with the plugin or the plugin .zip archive.

  6. jamesisin
    Member
    Posted 5 years ago #

    I don't have any others which require an update. I manually updated all the others (because they would not). But I admit that was before moving to .2 at which point the error message changed. As I have no other plugins requiring update I am unable to re-test this theory. I can only say with certainty that prior to upgrading to .2 this problem was effecting all plugins.

  7. mflane
    Member
    Posted 5 years ago #

    I am having this problem with other plugins not upgrading. I am getting the following errors:

    -------
    Warning: unlink() has been disabled for security reasons in /home/mishelle/public_html/blog/wp-admin/includes/file.php on line 453

    Warning: unlink() has been disabled for security reasons in /home/mishelle/public_html/blog/wp-admin/includes/file.php on line 453

    Upgrade Plugin

    Downloading update from http://downloads.wordpress.org/plugin/akismet.zip

    Download failed.: Could not create Temporary file

    Installation Failed
    -------

    This problem was discovered today when I noticed WP-SUPER-CACHE was not writing new files in its cache. WP-CONTENTS folder's permissions are 755 and .htaccess has the following:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*p=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*p=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress

    So, no automatic upgrade and no super cache operation because nothing can be written to WP-CONTENTS.

    Any ideas?

  8. balleyne
    Member
    Posted 5 years ago #

    I know what I just did was probably terrible from a security perspective, but I had this problem and I fixed it on a server I'm managing. I changed the permissions of all the directories in the WordPress installation to 0777. It was a bit of a brute force approach and it'd probably be better just to change the permission son the relevant directories (my guess is wp-content?), but the problem definitely seems to be an issue of the web server not having permission to write to the directory where it wants to create the temporary file (wherever that is).

    Hope that helps.

  9. mkalis
    Member
    Posted 5 years ago #

    I tried a bit safer thing - I changed the permissions for wp-content to 777 (with no recursion), and the automatic update created a subdirectory 'upgrade' with permissions 775 - so my guess is if you just create the subdirectory 'upgrade' with permissions 775 it should work (I'll test it when I need a new upgrade).

  10. mashby
    Member
    Posted 5 years ago #

    I tried the 775 approach to the wp-content directory and didn't have any luck. Still got the same error "Download failed.: Could not create Temporary file".

    I changed the permissions to 777 to wp-content and the upgrade went fine. When it was done, I reverted back to 755 for the directory.

    There has to be a better way right?

  11. austink
    Member
    Posted 5 years ago #

    It worked for me to change wp-content to 777 and then do the upgrade. However, changing it back to 755 after the upgrade folder is created stops it from working again. Had to keep wp-content at 777 until all of the plugins that needed upgrading were changed.

    Is this the way everyone has it or is there a solution?

  12. awayken
    Member
    Posted 5 years ago #

    I had a similar issue, and the solution was the IIS equivalent of chmoding the wp-content directory to 777. Essentially, I had to give the web user account Modify permissions on the wp-content folder.

    Just thought I'd share a solution.

  13. jamesisin
    Member
    Posted 5 years ago #

    Well, I just don't see myself giving my Internet Guest account modify rights on my WP content folder. That sounds like a train-wreck premonition.

    I tried a number of shallower permissions settings to no avail.

    I'm really annoyed that none of the WP folks have chimed in on this one with some official instructions, because this is now the only way in which plugins can be upgraded using the site itself. That is to say, both links in my blog now bring me to the same end.

    Instead I have to manually search for the new version on the WP site. Can I have the old link back? This is a little stupid: take away the old link when the new upgrade process isn't working.

  14. jamesisin
    Member
    Posted 5 years ago #

    Current error message reads:

    Upgrade Plugin

    Downloading update from http://downloads.wordpress.org/plugin/add-to-any.0.9.8.7.1.zip

    Download failed.: Could not create Temporary file

    Plugin upgrade Failed

  15. JonnyBee
    Member
    Posted 5 years ago #

    On the matter of CHMOD permissions

    Could I point out that CHMOD does not exist on Windows servers? It is SOLELY a unix/linux permsissions script. If someone is on a HOSTED Windows Server system that runs Plesk, Parallels or another Control Panel, there may be a 'control' that says 'CHMOD' - BUT that's not what is happening at the File System/OS level - its a 'for Unix administrators' kludge. If you are using an FTP program, you can set permissions all you want to in it, Windows had no idea what you are doing. This is because the two file systems are inherently different, so there is no one-to-one correspondence to be made.

    http://computingtech.blogspot.com/2008/05/windows-server-2008-ntfs-file-and.html

    James is on IIS, and if its his own system - then permissions are set in the MMC snap-in "IIS" which should be on the desktop.

    I'll be back, with a few answers/look-fors tomorrow on this problem. I have worked on module issues with other cross-platform software. I'm pretty sure this one is because there is no native support on Windows servers for 'zip' decompression. I ran into the same thing working on Yabb where restore packages were in Zip format.

    Good Luck all

  16. jamesisin
    Member
    Posted 5 years ago #

    Sounds intriguing. I'm looking forward to it.

  17. rorndoff
    Member
    Posted 5 years ago #

    Not sure that non-native zip support is the issue. I'm running IIS on WindowsXP, which does have native zip support. Having the exact same problem as describe above, and for sometime now.

  18. jamesisin
    Member
    Posted 5 years ago #

    If this is broken for Windows users then can we at least have to old functionality back (where we could click a link and MANUALLY download the updated plugin)?

    I'm not so sure about the "native zip decompression" either. Server 2003 has a built in utility for extracting from zip archives (though I have 7zip installed as well). But I am still looking forward to what JonnyBee has to say on the matter.

  19. truetrev
    Member
    Posted 5 years ago #

    i can't auto upgrade either mine just goes to a blank page with a string like:

    update.php?action=upgrade-plugin&plugin=stats+3%2Fstats.php&_wpnonce=44772c04a9

    strange

  20. chrisoverstreet
    Member
    Posted 5 years ago #

    Here's what I did on my *nix host:

    Create a temporary directory under httpdocs, such as:

    tmp or
    wp-content\tmp

    CHMOD this directory to 777.

    Add the following line to your wp-config.php:

    define('WP_TEMP_DIR', ABSPATH . 'tmp'); or
    define('WP_TEMP_DIR', ABSPATH . 'wp-content/tmp');

  21. flashbuddy
    Member
    Posted 5 years ago #

    Oh crap, I got so excited 'bout the idea Chris had, didn't work for me:

    Downloading update from http://downloads.wordpress.org/plugin/add-lightbox.zip

    Download failed.: name lookup timed out

    Plugin upgrade Failed

  22. Saurus
    Member
    Posted 5 years ago #

    I'm really annoyed that none of the WP folks have chimed in on this one with some official instructions, because this is now the only way in which plugins can be upgraded using the site itself.

    Does it need saying AGAIN that this forum is not frequented by the WP team? There are all VOLUNTEERS here who have experience and expertise in various facets of WP and programming languages WP uses, like PHP, HTML, and CSS. So there will be no "official" instruction on your problem, mainly since it is a PLUG-IN that WP did not write. Problems with plug-ins should be directed to the author via instructions provided with same. If instructions on use are NOT provided with a plug-in - don't use it!

    Is there any reason on Earth you can't update like you did the others ... manually?

  23. MichaelH
    Member
    Posted 5 years ago #

  24. jamesisin
    Member
    Posted 5 years ago #

    Saurus - Perhaps you believe that your comments were intended to be helpful and thus I will offer you the benefit of that doubt. I will address your mistakes in the order they appear.

    First, even if "this forum is not frequented by the WP team" this does not exclude the possibility that one of them will have commented somewhere on a piece of their newest version which breaks functionality from the previous versions (and removes or obscures the old functionality).

    Second, the WP site is filled to the brim with "official" instructions on many such problems. What I would expect to see here is merely a link to one such article which discusses this problem.

    Third, and you should read this carefully, it is not a problem with a plug-in. The problem is with WP itself. WP has functionality built in which purports to upgrade any plug-in (through the WP site). However, all plug-ins fail. This is WP which is broken.

    And finally, "Is there any reason on Earth you can't update like you did the others ... manually?" Yes, and I made this clear in the thread above also. WP is broken and needs fixing. Clicking the "upgrade automatically" will produce errors (such as put forward by FlashBuddy above). Clicking the "view..." link and then the "Install Update Now" link will produce the exact same results. In order to get the update it is necessary to click the "view..." link for that plug-in, then click the "WordPress.org Plugin Page", and then use that page to manually download the new version.

    I'm just not sure how you thought you were being helpful.

    All this being said, it appears to be a permissions issue of some sort. And yet there is no mention of the need to provide any special permissions to deal with the plug-in upgrades in any of the WP documentation, including especially the installation documentation.

  25. jamesisin
    Member
    Posted 5 years ago #

    MichaelH - Thanks for the link. I posted a question there as the solution was a bit vague. I'll report back if anything comes of it.

  26. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Most likely answer: Your host has disabled some kind of functionality that it requires to work.

    "Cannot create temporary file" points to the webserver not being able to write files to the wp-content directory. Yes, for upgrades to work, WordPress has to be able to write files into the wp-content folder itself. I've complained about this too, I'd rather it be in the uploads folder, which is normally writable already. The WP_TEMP_DIR solution posted above will work if you want to define the temp directory to be elsewhere.

    Why I don't have a real answer: Because I can't replicate the problem. It works perfectly on every host I've installed WP on (over 20). The answer has to be something wrong with your server. Nobody can tell you what that is because they don't have access to your server.

  27. jamesisin
    Member
    Posted 5 years ago #

    I agree I would rather see them use a temp directory or the uploads directory for this purpose, but I am the host and I haven't changed anything to disable this functionality on my server.

    And it's not just me seeing this problem. There are many Windows server users who encounter it. WP has an expectation which is presumably not being fulfilled properly. What that expectation is and what Windows server admins can do to fulfill it are what this question is all about.

    My guess is that the final solution will be quite simple. I will certaily post it here when it becomes available.

  28. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    IIS servers are different. They don't have simple and obvious permission systems, what with the strange accounts system and all that Windows uses. IIS is somewhat difficult to use in this respect, and so most of us WP users don't have much experience with it. I mean, I can configure a LAMP setup correctly in minutes, or a WAMP setup in half an hour, but an IIS setup will take all bloody day...

    Try that WP_TEMP_DIR thing above, and make sure that whatever dir you point it to is writable by the IIS web guest account or whatever the heck it's called. Sorry, I forget. I've had a few tonight, and dealing with Windows gives me a headache even when sober. ;-)

  29. jamesisin
    Member
    Posted 5 years ago #

    Well, adding the tmp directory and the upgrade directory as mentioned above--and giving my entire content folder (and subs) write permissions has nudged the problem forward:

    Downloading update from http://downloads.wordpress.org/plugin/add-to-any.0.9.8.9.1.zip
    Unpacking the update
    Deactivating the plugin
    Removing the old version of the plugin
    Could not remove the old plugin
    Plugin upgrade Failed

    The old version just gets deactivated and no upgrade actually happens, though the file is downloaded (into tmp) and unzipped (into upgrade). Baby steps.

    Ok, allow me a moment of ranting...

    If my wp-content folder is SUPPOSED to have a tmp and upgrade folder (and clearly the upgrade folder is essential to the built-in functionality), WP should include those folders with the main package.

  30. jamesisin
    Member
    Posted 5 years ago #

    Incidentally, for those following this thread, the purpose of using a tmp folder as outlined above appears to be de-cluttering and not functionality per se. If you do not use the tmp folder as outlined above, all of the temporary plugins will wind up in your wp-content folder along with a numbered extensionless file(s) related to that plugin. For this reason, I recommend using it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.