![Picture of Fred Savage Picture of Fred Savage](/graphics/unknown.gif)
Fred Savage - 2019-01-21 03:38:21
This is a decent RAR class but after testing it is apparent that it does not actually "compress" the files/folders.
My findings are that due to it "mocking" RAR behavior and format, AV's may *falsely* flag it as a trojan (Trojan:Script/Foretype.A!ml or Trojan:HTML/Brocoiner.N!lib).
For those interested, there is a solution but it involves installing RAR on your OS (Windows or Unix) plus using PHP's shell_exec to execute RAR commands.
One does not actually need this class at all using RAR via shell_exec but this class does make it easier to manipulate files.
After this RAR-Archiver class creates your RAR archive, you can use shell_exec to instruct RAR to fix the file. This will indeed compress its contents properly and allow your archives to pass AV checks.
Please read the authentic GitHub account for Rar-Archiver class.
The author seems to be dormant for the moment therefore at this time I suggest reading my PR (pull request) for details about the needed change. It will give instruction and the necessary file edit.
I am hesitant to leave the GitHub link as the Administrator may find that in violation of his terms. Just use a search engine to find "GitHub rar archiver" and you should be able to find this authors account.
I hope this helps people in search of creating true compressed RAR archives.
Good luck.