Bradley Giesbrecht pixilla at
Sun Nov 6 09:19:29 PST 2011

On Nov 6, 2011, at 8:39 AM, Phil Dobbin wrote:

> On 6/11/11 16:28, "Bradley Giesbrecht" <brad at> wrote:
>> Yes, sdk.class.php simply includes IF IT EXISTS. Whatever php
>> would parse in could
>> be parsed in ANY FILE before require_once("AWSSDKforPHP/sdk.class.php");.
>> The AWSSDKforPHP package includes a sample file. While you
>> learn to use the class I suggest you copy
>> it to your working directory and include it before the sdk class. Later you
>> can move the file somewhere else
>> for organizational purposes.
>> $ cp /opt/local/lib/php/pear/AWSSDKforPHP/
>> ./
>> In your script:
>> require_once("");
>> require_once("AWSSDKforPHP/sdk.class.php");
> I moved the original `AWSSDKforPHP` that I downloaded from PEAR via MacPorts
> to ~/.aws/sdk before I port installed the AWSSDKforPHP so as not to confuse
> things.

Generally speaking you should not "move" files installed by MacPorts. Coping sample configuration files is expected.

> The MacPorts `` contains my AWS security details as
> does the one in ~/.aws/sdk.

When you say "MacPorts ``" you mean the file that you copied to {some dir}/, right?

I would move ~/.aws out of the way, you don't need it and it can only add to confusion should AWSSDK pickup some file in that dir.

Just include your config file before you include the class. If working with an existing/example application adding your config file to the top of the first php file should be fine.

Bradley Giesbrecht (pixilla)

More information about the macports-users mailing list