Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#13571 closed defect (bug) (worksforme)

Some plugins affected by "Could not remove the old plugin."

Reported by: pavelevap's profile pavelevap Owned by: dd32's profile dd32
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Upgrade/Install Keywords: reporter-feedback
Focuses: Cc:

Description

(Created by dd32, Reported originally at http://core.trac.wordpress.org/ticket/13171#comment:12 )


Similar problem (latest trunk version, localhost with xampp on Windows):


Some plugins (and only some versions) end with "Could not remove the old plugin."


Example (plugin wp Time Machine):
Upgrade (yesterday) wp-time-machine from version 1.9.1 to 1.9.3 = OK.
Upgrade (today) wp-time-machine from version 1.9.3 - 1.9.4 = Upgrade failed.


The same problem appeared for me also with following plugins (in last two weeks):

 mass-custom-fields-manager 1.2 - 1.3
 pods 1.8.7 - 1.8.8
 gd-taxonomies-tools 1.1.8 - 1.1.9
 odlinks 1.1.1-a - 1.1.2-a

This strange behaviour is somehow random, some plugins are not affected, some are affected only with particular version...

Change History (7)

#1 @dd32
14 years ago

I've set this to 3.1 pending confirmation of what is causing this.

Can you test a 2.9.2 install on the same setup in a similar folder structure and see if that suffers the same problem?

#2 @dd32
14 years ago

Using wp-time-machine from version 1.9.3 - 1.9.4 = Upgrade failed as a test, I cant reproduce this on a Windows XP host.

What version of Apache and Windows are you using? PHP Version? PHP Safe Mode?

#3 @dd32
14 years ago

Can you reproduce this as well? time after time? Or is it sporadic?

Are you using an SVN export of WordPress? (What client?) Are you running any antivirus and/or Search indexing applications?

Try disabling as much as possible of file-related applications and see if you can reproduce. That error message will be given when PHP itself cannot delete the files from the plugin folder for some reason, common reasons on windows is that something else has the files/folder locked.

Under Windows Vista/7, This might also be caused by you editing a file, and the ACL's then denying Apache(and therefor, PHP) write access to the file..

When the upgrade fails, What is left in the Plugins folder? Nothing? All the files? (compare folder size before and after), Specific files?

I used to have this problem often while using TortoiseSVN, It would sometimes lock the files and track the file updates.. I havnt had the problem since updating TortoiseSVN in awhile.

#4 @pavelevap
14 years ago

  • Cc pavelevap@… added

OK, thank you for creating new ticket...

My configuration: Windows Vista Business, PHP 5.2.6, Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.6, safe_mode = Off.

I watch several hundreds plugins for my website about WordPress and I use latest trunk of WordPress (Tortoise SVN) with localhost for testing purposes (but only some plugins activated - I also tried to deactivate all plugins). This problem appears several months ago with 3.0 development. Every other day I usually upgrade about 5 - 10 plugins and one of them is usually with this problem (sometimes none, sometimes two). Generally speaking about 5 - 10 % updates fail. Some plugins fail many times (for example wp-time-machine) during last weeks, some plugins never.

I will try to watch it more carefully and find any cause or relation (and differences in folders before and after upgrade)...

#5 @GDragoN
14 years ago

As dd32 said, on Windows it's very common for system to lock files preventing deletion causing the upgrade to fail. If plugin uses fonts from own folder for PHP GD library, on Windows, once the PHP loads the font, font can't be deleted until the Apache restart. Opening file for editing will have similar effect causing the lock of the file. But, there is one even worse problem on Vista that can cause files to be locked almost randomly when accessed by some of the services used for indexing (doesn't happen with Windows 7), and I have similar problems in the short time I used Vista at all.

#6 @dd32
14 years ago

  • Milestone 3.1 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

re-open if steps to reproduce are consistently found. I believe this is probably OS level file locking due to another application.

#7 @sirzooro
14 years ago

You can try to use Process Monitor (successor of FileMon) to monitor filesystem operations - it may help you to find the root cause of this problem.

Note: See TracTickets for help on using tickets.