mnavarro 0 Newbie Poster

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
include_once('../lib/Tar.php');

$tar_object = new Archive_Tar("../files/tarFiles/test.tar");

if (($v_list  =  $tar_object->listContent()) != 0) {
    for ($i=0; $i<sizeof($v_list); $i++) {
        echo "Filename :'".$v_list[$i]['filename']."'<br>";
        echo " .size :'".$v_list[$i]['size']."'<br>";
        echo " .mtime :'".$v_list[$i]['mtime']."' (".
             date("l dS of F Y h:i:s A", $v_list[$i]['mtime']).")<br>";
        echo " .mode :'".$v_list[$i]['mode']."'<br>";
        echo " .uid :'".$v_list[$i]['uid']."'<br>";
        echo " .gid :'".$v_list[$i]['gid']."'<br>";
        echo " .typeflag :'".$v_list[$i]['typeflag']."'<br>";
   }
}
?>

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!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.