gdfhghjdfghgfhf Posted June 21, 2013 Share Posted June 21, 2013 I'm trying to install the rar package. I checked php.net's installation docs and it just said to execute pecl -v install rar i did it and rebooted server but its still not working. i'm very noob with the linux stuff so maybe did i do something wrong ? i'm trying to execute this script, i found it on php.net docs so it should be working: $rar_arch = RarArchive::open('dl/test.rar'); if ($rar_arch === FALSE) die("Could not open RAR archive."); $rar_entries = $rar_arch->getEntries(); if ($rar_entries === FALSE) die("Could retrieve entries."); echo "Found " . count($rar_entries) . " entries.\n"; foreach ($rar_entries as $e) { echo $e; echo "\n"; } $rar_arch->close(); how can i check if rar package was successfully installed ? Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/ Share on other sites More sharing options...
kicken Posted June 21, 2013 Share Posted June 21, 2013 There should be something in the output of phpinfo showing it installed. You may need to edit the php.ini file to load the extension. Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437185 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted June 21, 2013 Author Share Posted June 21, 2013 No, nothing in phpinfo about that what do i need to add to php.ini and what is the ssh command to do it ? Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437250 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted June 25, 2013 Author Share Posted June 25, 2013 still stuck here... need help Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437745 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted June 25, 2013 Author Share Posted June 25, 2013 Just tried installing it with pecl again... getting this error: building in /tmp/pear/temp/rarrunning: phpizesh: phpize: command not foundrolling back 388 file operationsERROR: `phpize' failed Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437746 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted June 26, 2013 Author Share Posted June 26, 2013 Ok i figured out how to install phpize, now this is what i am getting when trying to run "pecl -v install rar" checking how to run the C++ preprocessor... /lib/cppconfigure: error: in `/var/tmp/pear-build-root/rar-3.0.1':configure: error: C++ preprocessor "/lib/cpp" fails sanity checkSee `config.log' for more detailsrolling back 388 file operationsERROR: `/tmp/pear/temp/rar/configure' failedroot@ks3272412:~# configure: error: in `/var/tmp/pear-build-root/rar-3.0.1': Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437957 Share on other sites More sharing options...
trq Posted June 26, 2013 Share Posted June 26, 2013 What distro are you using? Have you tried using it's package manager instead? Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437958 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted June 26, 2013 Author Share Posted June 26, 2013 nvm got it... i had to install C++ compiler first i'm on Debian Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437962 Share on other sites More sharing options...
trq Posted June 26, 2013 Share Posted June 26, 2013 apt-get update && apt-get install php5-rarDone. Quote Link to comment https://forums.phpfreaks.com/topic/279407-installing-rar-package/#findComment-1437964 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.