Jump to content

[PHP/Linux] RAR files, Linux and PHP


CodeMaster2

Recommended Posts

I am working on an application to Rar and UnRar files, the latter of which is possible through native PHP functions, but the Raring (compressing/arching/packing/creating) isn't. I know that the same program that allows for UnRaring is available, but for some reason is not implemented already in PHP. Unfortunately, I lack the skill and the know-how to integrate a program with a PHP script, much less in Linux, an OS I have little experience in.

 

Any help would be very appreciated.

 

Links:

Rarlabs: http://rarlabs.com/download.htm

PHP Classes compression class (Windows only): http://www.phpclasses.org/browse/package/3556.html

PHP native RAR functions: http://www.php.net/rar

Link to comment
Share on other sites

Yes, it has... For windows.

 

If you take a look at that source code you'll see that you need to have WinRAR.exe for it to function. Unfortunately, even though there is a Linux version, the author of that code didn't include implementation of it - which incidentally is what I'm looking for.

Link to comment
Share on other sites

The only thing that class does is run some commands via the exec function...which should be platform independent.  Once you install rar to your linux server, then you simply change the variable in the class to point to the executable.

 

You will either need to find some binaries for your linux distro, or get the source from rar labs and compile it.  Then it should work fine.

 

I believe the reason that you can not compress to rar with the pecl library is because you must purchase a license for the rar software.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.