Sitening

Home » Blog

Introducing PHP-AWS

By Tyler Hall

Today I’m happy to announce a new open source project from Sitening.

PHP-AWS is a collection of PHP classes that let you tap into the power of Amazon’s Web Services platform. This is the same codebase we used to build Basejumpr. It lets us offer our users unlimited storage space and run as many servers as we need in the cloud.

PHP-AWS is hosted in Google Code and released under the MIT License, which means you’re free to use this code in any way you wish. However, we do ask that you contribute back any improvements you make so the community can benefit from them.

Currently, the project contains support for:

By no means is our code perfect. There’s plenty of room for improvement. However, we’ve been using it for nearly three months without any major issues and consider it stable for release.

When we first began work on Basejumpr, I looked around the net and found a lot of example code using S3. Perl, Ruby, Python, and PHP libraries aplenty. Unfortunately, most of the code was incomplete, poorly designed, or died (due to memory issues) when uploading/downloading large files.

Since working with big files was a must for us, this meant we’d have to build the code ourselves. We’re pleased with the results. And we hope you’ll be, too.

This entry was posted on Tuesday, January 30th, 2007 at 4:42 pm and is filed under Open Source, PHP. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


12 Responses to “Introducing PHP-AWS”

  1. Peter Van Dijck’s Guide to Ease » Blog Archive » Says:

    [...] Update: This one looks even better, can handle large uploads without putting everything in memory, and handles Amazon’s other services too. [...]

  2. Sitening Blog : Blog Archive : Amazon S3 File Browser - Nashville SEO (Search Engine Optimization) and Web Design Says:

    [...] Last month I blogged about the release of PHP-AWS - our open source Amazon Web Services library. Today I want to highlight the S3 File Manager I recently added to the project. It makes debugging your S3 code much easier. Not only does it let you browse your bucket contents, download and delete files, but it’s also an excellent example of how to use the S3 class. The script is self-contained, so it’s easy to drop into any of your projects. Just open the file in your browser, fill in your Amazon info, and you’re all set. Tags: No Tags [...]

  3. PanMan Says:

    I get an error on line 314 of your class:
    Fatal error: Call to a member function on a non-object in /path/s3class.php on line 314
    That line reads: $sha1 = $this->_hasher->hash($str);
    Any ideas how to fix this?
    Thanks!

  4. Tyler Hall Says:

    PanMan: It looks like you don’t have the Crypt_HMAC Pear module installed. You can get it here:

    http://pear.php.net/package/Crypt_HMAC

  5. PanMan Says:

    I do have that installed. As I posted on the S3 forum:
    http://developer.amazonwebservices.com/connect/thread.jspa?threadID=14678&tstart=0

    If I add
    $this->_hasher = new Crypt_HMAC($this->_secret, “sha1″);
    on the line before the line that errors, it works, but it tells me I have no buckets. I use the example code from your class. Love to get it working (and feeling kinda newbie here..)

  6. Tyler Hall Says:

    PanMan: I’m pasting a copy of the reply I sent you in the AWS forum…

    I downloaded a fresh copy of PHP-AWS and everything worked fine for me.

    Are you using PHP 4 or 5? This class uses PHP5 syntax. If you’re running 4, it will skip over the __construct() constructor and never initialize the class variable $this->_hasher. That’s probably why you’re having to create it locally inside the signature() method.

    If you change __construct() to be named S3() you should be set. I believe that’s the only PHP5 specific code in the class.

    As for the example file saying you don’t have any buckets, that’s probably because it didn’t initialize $this->_key and $this->secret in __construct() either. It wasn’t able to connect to S3 since it didn’t have your login information.

  7. PanMan Says:

    Hi. I still had some problems, but I got it all working. I posted in the Amazon forums thread, lets keep the discussion there.
    http://developer.amazonwebservices.com/connect/thread.jspa?messageID=56890&#56890

  8. Sebastian Says:

    I visited activecollab.com and there is free and opensource project.
    You build basejumpr.com Is it right way for professional company use and make money from free opensource software?

  9. Jon Henshaw Says:

    Sebastian, the BaseJumpr code is freely available. All you need to do is ask for the code. In fact, you can get more info on it at Google Code - http://code.google.com/p/basejumpr/ . And yes, people provide services with open source software every day and charge for their service. It’s a pretty common and accepted practice. However, the importer software is not open source and did not come from activecollab, and is not freely available.

  10. Sebastian Says:

    I have just read on activeCollab blog that they will publish version 1.0 soon. Licence will change and what will happen with basejump then?

  11. Sebastian Says:

    I would like sign up to basejump.
    Which version of activeCollab is installed on your serwer?
    Is is stable?

  12. Sebastian Says:

    no answer?
    question are too difficult?

Leave a Reply