Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello, what is the problem causing this error? #34

Closed
nottellyou opened this issue May 13, 2023 · 4 comments
Closed

Hello, what is the problem causing this error? #34

nottellyou opened this issue May 13, 2023 · 4 comments

Comments

@nottellyou
Copy link

Hello, what is the problem causing this error?

Binary of 7-zip is not available
root@:~# ls -l /usr/bin/7z
-rwxr-xr-x 1 www root 39 Aug 15  2020 /usr/bin/7z
root@:~# 7z -version

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,1 CPU AMD EPYC 7601 32-Core Processor                 (800F12),ASM,AES-NI)

Debian11.6, php7.4.33

@Gemorroj
Copy link
Owner

Hi. look at this function https://github.com/Gemorroj/Archive7z/blob/5.5.0/src/Archive7zTrait.php#L47
An plz, show me the example of your code.

@nottellyou
Copy link
Author

Hi, @Gemorroj :
These are my code:

    if(strcasecmp(PHP_OS, 'WINNT') == 0) {
        $obj = new Archive7z($filename, $exepath);
    }else{
        $obj = new Archive7z($filename);//-- Here will cause the error
    }
    $count = count($obj->getEntries());

I try to use $obj = new Archive7z($filename, '/usr/bin/7z'); , but the error still shows.
I have no idea.

@nottellyou
Copy link
Author

nottellyou commented May 14, 2023

Oh, I know the problem is open_dir .

But I found another problem, gibberish

?????????rarzip
hosts    772.31KB
??????????.jpg    4.37KB
snipaste20230511_144615.jpg    33.85KB
0_cleanup.jpg    28.82KB

The test file: http://50.116.14.233/171829s6ygqmhhh9jgycch.rar

@Gemorroj
Copy link
Owner

@nottellyou yes, it's known problem. see #15 or #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants