ParK Posted May 29, 2007 Share Posted May 29, 2007 i try to extract a rar file via php but i get an error: Fatal error: Call to undefined function: rar_open() in --parksdiary.com/httpdocs/rar2.php on line 8 my codes: <?php $filename = "file.rar"; $filepath = "/rar_ac"; $rar_file = rar_open($filepath.$filename); <--- here is the rar_open function line $list = rar_list($rar_file); foreach($list as $file) { $entry = rar_entry_get($rar_file, $file); $entry->extract("."); } rar_close($rar_file); ?> i dont understand why iam getting this error ??? may you help me ? Quote Link to comment https://forums.phpfreaks.com/topic/53378-extracting-a-rar-file/ Share on other sites More sharing options...
MadTechie Posted May 29, 2007 Share Posted May 29, 2007 Rar is currently available through PECL RAR you need pecl rar installed on the server download and gunzip rar-xxx.tgz tar -xvf rar-xxx.tar cd rar-xxx phpize ./configure && make && make install Quote Link to comment https://forums.phpfreaks.com/topic/53378-extracting-a-rar-file/#findComment-263771 Share on other sites More sharing options...
bsprogs Posted September 21, 2007 Share Posted September 21, 2007 I'm getting this same error. I followed the instructions form http://www.php.net/rar. I first tried the normal installation gunzip rar-xxx.tgz tar -xvf rar-xxx.tar cd rar-xxx phpize ./configure && make && make install make install ran successful but rar_open never worked. So I tried the PECL installer to install the Rar extension, using the following command: pecl -v install rar. Still, ever after server restarts from each install, rar_open keeps returning the same error: Fatal error: Call to undefined function rar_open() in .... Any ideas? I'm running PHP Version 5.2.2 Quote Link to comment https://forums.phpfreaks.com/topic/53378-extracting-a-rar-file/#findComment-352074 Share on other sites More sharing options...
gxion Posted February 20, 2008 Share Posted February 20, 2008 got the same error.. :-\ Tell me ,how can I know all the functions I have in my vps ? just to be sure if my installation for pecl was right. Quote Link to comment https://forums.phpfreaks.com/topic/53378-extracting-a-rar-file/#findComment-471995 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.