L
L
lepidoptera2018-03-02 10:38:26
PHP
lepidoptera, 2018-03-02 10:38:26

How to unpack .XZ using PHP?

Hello!
You need to unpack the .xz archive using PHP. I can't find such a script.
Tried raulfrale/distill - doesn't work.
Tried wapmorgan/unified-archive - doesn't work.
I climbed into the latter to see why it does not work. There, inside the constructor, the presence of the PHP 'xz' extension is checked. I did not find any information on this extension on the net - I cannot send a sane request to the server's technical support.
payden/php-xz can't install because server side administration and sudo and everything else is not allowed.
I also tried all the unpackers built into PHP, of course.
Please advise how to be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2018-03-02
@lepidoptera

The xz-utils (Debian) package is required on the server.
You can unpack by running an external OS command:
tar -xf file.tar.xz
or
unxz myarchive.xz

A
Anton, 2018-03-02
@karminski

It looks like the only option is to ask tech support to build and include the payden/php-xz library for you. Without it, PHP will not understand .XZ archives.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question