Skip to main content

Installing RAR Extension on PHP 8.3


 One of the app I'm working requires RAR extension on PHP. Unfortunately the latest RAR version doesn't work on the PHP version installed on my machine (PHP 8.3). Searching the forum for a few minutes gave me this solution:

1. Install php-dev (phpize) if it isn't installed yet

2. Get the extension from cataphract

git clone https://github.com/cataphract/php-rar

3. Configure and install

cd php-rar/
phpize
./configure && make && sudo make install

4. Load it to PHP (I'm using PHP-FPM)

echo '; configuration for php rar extension'|sudo tee -a /etc/php/8.3/mods-available/rar.ini > /dev/null
echo 'extension=rar.so'|sudo tee -a /etc/php/8.3/mods-available/rar.ini > /dev/null
sudo ln -s /etc/php/8.3/mods-available/rar.ini /etc/php/8.3/fpm/conf.d/20-rar.ini

5. Restart the PHP-FPM

sudo systemctl restart php8.3-fpm

And here is the result



Comments

Popular posts from this blog

Java apps fonts too big

 This was happened when I first tried to run SweetHome3D Portable. As it was a portable software, I didn't want to be bothered by installing it. The apps was running, but as you can see at the picture above, the fonts were way too big on my screen. The original bash script for running the app was: exec "$PROGRAM_DIR"/runtime/linux/x64/runtime/bin/java -Xmx1024m -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/jeksparser-calculator.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1c.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dcore.jar:"$PROGRAM_DIR"/lib/java3d-1.6...

Yarn Pubkey Error

Sistem update software di laptopku tiba-tiba error (minor) dengan pesan: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx> Solusi