• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Installing rar.so extension for PHP 7.4

massimo

New Pleskian
Hi everyone,
I have been struggling trying to install the RAR extension for PHP in Plesk Obsidian 18.
I need it for PHP 7.4.

I have followed this guide (Adding Custom PHP Module in Plesk) and now I see it in the Extensions:
Capture.JPG
But when I try \RarArchive::eek:pen($path) it says Class 'RarArchive' not found. Why?
Also, I don't see RAR in phpinfo. Here you can see my phpinfo https://151.236.37.206/test/addPreviewToArchive

I am trying to install it on my test server, I need the RAR extension on my production server but I am afraid of breaking something.

Anyone got a better guide or can help me out?

Best,
Massimo.
 
Have you tried to install RarArchive as package name on the server if that exists? The error could be related to missing libraries. For example with GeoIP you have to install the Geo-Devel package and I believe for curl you need to install libcurl. I always try to install all *<name>* packages and see what it gets. For example with GeoIP I try to install GeoIP* and see what it tries to install.

edit: restart php, Apache and just in case nginx if you can do that and don’t give websites downtime.
 
Have you tried to install RarArchive as package name on the server if that exists? The error could be related to missing libraries. For example with GeoIP you have to install the Geo-Devel package and I believe for curl you need to install libcurl. I always try to install all *<name>* packages and see what it gets. For example with GeoIP I try to install GeoIP* and see what it tries to install.

edit: restart php, Apache and just in case nginx if you can do that and don’t give websites downtime.
Thanks for your kind answer. I’ll do some more research on the packages you are mentioning. If anyone happens to have a specific guide for the rar extension, I cannot seem to find anything at all about it!

Best,
Massimo.
 
Back
Top