*

dtc67

  • *
  • 1 posts
Unzip failed & PHP Error
« on: April 15, 2021, 12:04:57 PM »
Hello,

Updating Beta theme and plugins stopped working from Osclass backend. All I get is Unzip failed. However updating language files works just fine. This seems to have happened after updating Ubuntu 20.04 on my VPS.

File and directory permissions seem to be as they were (755 and 644), owner of the files www-data (apache2).
Unzip is installed, as is php7.4-zip.
oc-temp folder is present in Downloads.

I set the debug mode on and get this in log:

PHP Notice:  Undefined index: i_version in /var/www/mysite.com/html/oc-includes/osclass/utils.php on line 2724

Any ideas what could have gone wrong?
« Last Edit: April 15, 2021, 12:06:28 PM by dtc67 »

*

MB Themes

Re: Unzip failed & PHP Error
« Reply #1 on: April 15, 2021, 03:28:20 PM »
Problem should be with this line in utils.php:
Code: [Select]
        $filename = date('YmdHis')."_".osc_sanitize_string($data['name'])."_".preg_replace('/[.,]/', '', $data['i_version']).".zip";

That should be changed into:
Code: [Select]
        $filename = date('YmdHis')."_".osc_sanitize_string($data['name'])."_".preg_replace('/[.,]/', '', (isset($data['s_version']) ? $data['s_version'] : @$data['i_version'])).".zip";

Will be fixed in 4.4 as well
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • ****
  • 112 posts
Re: Unzip failed & PHP Error
« Reply #2 on: April 19, 2021, 11:47:37 AM »
Hi,
I change to the above code you provided and I still got unzip error at the back office with osclassppoint updater

Update has failed, download and update product manually. [3] Unzip failed


What should I do to resolve this
Thanks

*

MB Themes

Re: Unzip failed & PHP Error
« Reply #3 on: April 19, 2021, 03:17:06 PM »
@oneloveb
1) above code is related to osclass core updater and above mentioned error, OsclassPoint updater plugin is not maintained anymore and on osclass 4.1 or later is not needed at all
2) unzip error usually does not relate to osclass, simply said PHP extension on your hosting is not able to unzip file, in that case you must unzip it manually.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots