Failed to upgrade to 0.55 due to touch() failure


(daberelay) #1

Hi,
I get the warning below while trying to upgrade to 0.55 with the one touch upgrade.

I cannot seem to find the reason for that as all my piwik folders and files have permissions to rwx for everyone.
and the apache runs under root.

I’m quite a novice unix/linux user, it might be a silly thing, but it is beyond me to find it.

please aid,

thanks!

Warning: touch() [function.touch]: Utime failed: Operation not permitted in /usr/local/apache/htdocs/track/libs/PclZip/pclzip.lib.php on line 3856

the backtrace says:
Backtrace -->
#0 Piwik_ErrorHandler(2, touch() [function.touch]: Utime failed: Operation not permitted, /usr/local/apache/htdocs/track/libs/PclZip/pclzip.lib.php, 3856, Array ([p_entry] => Array ([version] => 791,[version_extracted] => 10,[flag] => 0,[compression] => 0,[mtime] => 1246754268,[mdate] => 15076,[crc] => -2136093199,[compressed_size] => 933,[size] => 933,[filename_len] => 38,[extra_len] => 13,[comment_len] => 0,[disk] => 0,[internal] => 0,[external] => -2119958528,[offset] => 333043,[filename] => /usr/local/apache/htdocs/track/tmp/latest/piwik/plugins/UserCountry/flags/ms.png,[extra] => UT\…OJUx,[comment] => ,[stored_filename] => piwik/plugins/UserCountry/flags/ms.png,[status] => ok,[index] => 417),[p_path] => /usr/local/apache/htdocs/track/tmp/latest,[p_remove_path] => ,[p_remove_all_path] => ,[p_options] => Array ([77006] => ,[77001] => /usr/local/apache/htdocs/track/tmp/latest,[77020] => 63082332),[v_result] => 1,[v_header] => Array ([filename] => piwik/plugins/UserCountry/flags/ms.png,[extra] => UT \…OJŽ5£KUx!,[version_extracted] => 10,[compression] => 0,[size] => 933,[compressed_size] => 933,[crc] => -2136093199,[flag] => 0,[filename_len] => 38,[mdate] => 15076,[mtime] => 1246754268,[stored_filename] => piwik/plugins/UserCountry/flags/ms.png,[status] => ok),[v_dest_file] => Resource id #160,[v_size] => 0,[v_read_size] => 933,[v_buffer]…
1 touch(/usr/local/apache/htdocs/track/tmp/latest/piwik/plugins/UserCountry/flags/ms.png, 1246754268) called at [/usr/local/apache/htdocs/track/libs/PclZip/pclzip.lib.php:3856]


(vipsoft) #2

Change line 3856 in track/libs/PclZip/pclzip.lib.php from:

          touch($p_entry['filename'], $p_entry['mtime']);

to:

          @touch($p_entry['filename'], $p_entry['mtime']);

This will suppress the error message. I’ll report this upstream so they can fix it in the next release.

An explanation for why this fails is here: http://php.net/manual/en/function.touch.php#96221