944,031 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2029
  • PHP RSS
May 23rd, 2007
0

HELP! I get an erro when including PEAR.php file

Expand Post »
Im trying to handle .tar files with the PEAR Archive_Tar library, so i added the library directly to my lib directory on the website im developing and i copied a script to make a test which is the following

php Syntax (Toggle Plain Text)
  1. <?php
  2. include_once('../lib/Tar.php');
  3.  
  4. $tar_object = new Archive_Tar("../files/tarFiles/test.tar");
  5.  
  6. if (($v_list = $tar_object->listContent()) != 0) {
  7. for ($i=0; $i<sizeof($v_list); $i++) {
  8. echo "Filename :'".$v_list[$i]['filename']."'<br>";
  9. echo " .size :'".$v_list[$i]['size']."'<br>";
  10. echo " .mtime :'".$v_list[$i]['mtime']."' (".
  11. date("l dS of F Y h:i:s A", $v_list[$i]['mtime']).")<br>";
  12. echo " .mode :'".$v_list[$i]['mode']."'<br>";
  13. echo " .uid :'".$v_list[$i]['uid']."'<br>";
  14. echo " .gid :'".$v_list[$i]['gid']."'<br>";
  15. echo " .typeflag :'".$v_list[$i]['typeflag']."'<br>";
  16. }
  17. }
  18. ?>

When i try to run the script i get the following errors

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\airbus_wkpk\modules\home\lib\Tar.php on line 21

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='c:\wamp\php\PEAR') in C:\wamp\www\airbus_wkpk\modules\home\lib\Tar.php on line 21

I have looked for the file PEAR.php on the whole server folder but havent find it i dont really know what is happening here

Any idea??

Thanks on advance!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mnavarro is offline Offline
3 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: pdflib
Next Thread in PHP Forum Timeline: help with preg match





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC