PHP Classes

tests in ubuntu 16.04 fails

Recommend this page to a friend!

      PHP RAR Library  >  All threads  >  tests in ubuntu 16.04 fails  >  (Un) Subscribe thread alerts  
Subject:tests in ubuntu 16.04 fails
Summary:extractTo gives corrupted content
Messages:2
Author:jorge
Date:2016-06-30 21:39:42
 

  1. tests in ubuntu 16.04 fails   Reply   Report abuse  
Picture of jorge jorge - 2016-06-30 21:39:42
Environment: Ubuntu 16.04

php -v result:

PHP 7.0.4-7ubuntu2.1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

The example.php itself creates corrupted files.
One minimal test that lists the content of a rar works fine.
Other test to extract the same rar as above creates corrupted files.

Not using composer.
Changed "require_once 'vendor/autoload.php';"
TO: "require_once 'RarArchiver.php';"

  2. Re: tests in ubuntu 16.04 fails   Reply   Report abuse  
Picture of Underdog Underdog - 2018-08-05 01:22:04 - In reply to message 1 from jorge

I can confirm this problem.
I have tested it with PHP 7.2.3 locally using WampServer & PHP 7.2.8 using CentOS 7 live/server with the same issue.

It does not unpack archives properly as the files become corrupt.

I have been able to get it to compress files properly although it requires writing/using a script to first create a temp folder with all the needed files copied to it. I may include this change/addition on GitHub for other people.

I will mess around with the source code to see if I can get it to function. I'm not positive but to me it looks like it is not writing the files as binary. I will post back if I figure out a fix.