Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2125 closed Bug (fixed)

Piwik AutoUpdate (1.1.1 -> 1.2) failing with "Error Opening [absolute/path/to/piwik/latest/latest.zip]"

Reported by: peterb Owned by:
Priority: major Milestone: Piwik 1.2.1
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by peterb)

Still very hard to track down (now entries in the server / apache error logs) but it seems like there would be still a file lock on latest.zip when the piwik Updater tries to access it. File is in the given directory, permissions, etc. are correct.

Error was reproducible on my 2 Servers (which have the same config (basepath restriction, vhost, mod_php (5.2.6)). AutoUpdates used to run correctly by now.

Bug related to #1965.

Attachments (1)

oneClickUpdate-Regression.diff (1.2 KB) - added by peterb 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by peterb (peterbo)

  • Description modified (diff)

comment:2 Changed 3 years ago by peterb (peterbo)

Tracking down the error more deeply:

  • PHP Version 5.2.6-1+lenny9 (64Bit System) - exactly the same (sub)Version as in #1965 (-> bug in PHP very supposable!)
  • $this->ziparchive->open($filename) returns (int)5 (code 5 is supposed to be "ZIPARCHIVE::ER_READ")
  • Could be this PHP-Issue: http://bugs.php.net/bug.php?id=40873 related to http://pecl.php.net/bugs/bug.php?id=8714
  • deleted tmp/latest/piwik & tmp/latest/latest.zip manually and tried again
  • File latest.zip (when downloaded from the tmp/latest/ directory) is OK and accessible

Solution:

  • Updated the AutoUpdater to the 1.2 Version
  • Chmodded / Chgrped piwik directory
  • Applied patch (attachment)

comment:3 Changed 3 years ago by peterb (peterbo)

  • Description modified (diff)

comment:4 Changed 3 years ago by peterb (peterbo)

  • Milestone changed from 1.x - Piwik 1.x to 1.3 - Piwik 1.3

comment:5 Changed 3 years ago by vipsoft (robocoder)

Is that your fix?

comment:6 Changed 3 years ago by vipsoft (robocoder)

Ok, it is a patch. I'll apply and close.

comment:7 Changed 3 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4003]) fixes #2125 - thanks peterb

comment:8 Changed 3 years ago by peterb (peterbo)

My fix was to replace the Plugin "CoreUpdater", "/core/Unzip.php", "/core/Unzip/PclZip.php" and "/core/Unzip/ZipArchive.php" with the new files from 1.2.

The patch file fixes a warning (and that a possibly existing tmp/piwik directory is correctly removed) in "plugins/CoreUpdater/Controller.php" that uses "file_exists($this->pathRootExtractedPiwik)" while the member "pathRootExtractedPiwik" wasn't set yet.

Note: See TracTickets for help on using tickets.