AWS Pear Package Not working for Macports php56

212 Views Asked by At

I have recently upgraded to Yosemite and have installed php-56. I am running into the problem where I can no longer use Amazon's pear packages. So far I have done this:

sudo port install pear-PEAR
sudo port install pear-AWSSDKforPHP

And I have the following php code:

require_once 'AWSSDKforPHP/aws.phar';

use Aws\Common\Aws;
use Aws\S3\Exception\S3Exception;

And I get the following errors:

require_once(AWSSDKforPHP/aws.phar): failed to open stream: No such file or directory

What am I missing for this installation?

1

There are 1 best solutions below

0
On

Step 1:

If you don't already have this file, create '/opt/local/etc/php56/php.ini' . The easy way to create it is to copy the /opt/local/etc/php56/php-production.ini or /opt/local/etc/php56/php-production.ini that is already in the the directory.

Step 2

Add this line to the end of your php.ini

include_path = ".:/opt/local/lib/php"

That will include all the pear libraries