SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Guru hifigrafix's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    628
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble Accessing PEAR Items

    Greetings,

    I'm trying to setup Amazon S3 for hosting some videos and I'm using their s3 class.

    Unfortunately over a year of developing with PHP I've never been forced to use PEAR.

    I'm all setup but the script isn't able to access the Crypt HMAC package that I installed via ssh. It's there because when I try to install it again it says that "It's already installed".

    I'm not familiar with PEAR but have read Sitepoints article on the subject.

    My script is giving me the following error when trying to access the PEAR package:
    PHP Code:
    Warnings3::s3(Crypt/HMAC.php) [function.s3]: failed to open streamNo such file or directory in /var/www/vhosts/***.com/httpdocs/includes/s3.class.php on line 217

    Fatal error: s3::s3() [function.require]: Failed opening required 'Crypt/HMAC.php' (include_path='.:') in /var/www/vhosts/***.com/httpdocs/includes/s3.class.php on line 217 
    My PEAR repository is way up in /usr/share/pear directory (/usr/share/pear/Crypt/HMAC.php IS INSTALLED) and my server is a Dedicated GoDaddy server.

    Can anyone tell me how to possibly fix this?

    Thanks
    jw

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,140
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    pear error

    The error message sounds to me more like a resource problem than a problem finding package files. Is this error from running the test file included with the package?
    PHP Code:
    <?php
        
    /* This test file implements the three test vectors as described in
         * RFC 2104 (http://rfc.net/rfc2104.html) */
        
    require_once 'Crypt/HMAC.php';

        
    $key str_repeat(chr(0x0b), 16);
        
    $crypt = new Crypt_HMAC($key'md5');
        echo 
    $crypt->hash('Hi There')."\n";

        
    $key 'Jefe';
        
    $crypt->setKey($key);
        echo 
    $crypt->hash('what do ya want for nothing?')."\n";

        
    $key str_repeat(chr(0xaa), 16);
        
    $data str_repeat(chr(0xdd), 50);
        
    $crypt->setKey($key);
        echo 
    $crypt->hash($data)."\n";
    ?>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •