I need to extract rar file for my custom import extension.
i have used
exec("unzip/path/images.rar", $result, $returnval);
but not working.
Any one knows how to extract rar file using SSH+php
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Did you try running the rar x archive.rar command inside shell_exec().
shell_exec('rar x path/to/rar/file/filename.rar');
Make sure that path of the rar file is correct.
If the file is in the same folder where your php file is then you can give the filename without giving any path.
First, check if rar is installed in your Linux system.
if not installed, then you can run the following command -
sudo apt-get install rar