Jump to content

Warning: ZipArchive::extractTo() [ziparchive.extractto]:


Recommended Posts

Hey everybody,

 

 

I can't extract my zipped modules, it cames this message:

 

Warning: ZipArchive::extractTo() [ziparchive.extractto]: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/prestashopv147/classes/Tools.php on line 2125

 

Error trying to extract the module, could be corrupted.

 

The permission to read and write on this paste, and on everything is allowed. And the paragraph on the line 2125 is like that:

 

 

public static function ZipExtract($fromFile, $toDir)

{

if (!file_exists($toDir))

mkdir($toDir, 0777);

if (class_exists('ZipArchive', false))

{

$zip = new ZipArchive();

if ($zip->open($fromFile) === true AND $zip->extractTo($toDir) AND $zip->close())

return true;

return false;

}

else

{

require_once(dirname(__FILE__).'/../tools/pclzip/pclzip.lib.php');

$zip = new PclZip($fromFile);

$list = $zip->extract(PCLZIP_OPT_PATH, $toDir);

foreach ($list as $extractedFile)

if ($extractedFile['status'] != 'ok')

return false;

return true;

}

}

 

 

what is going wrong please?

 

 

Thanks a lot!

Link to comment
Share on other sites

×
×
  • Create New...