Zend 1 3d party NameSpaces startup not working
I'm trying to implement Amazon WebServices PHP SDK in my Zend 1 project, but it doesn't seem to load the classes.
I have a library in library/Eplan/AmazonCloudSearch
, and after researching it seems that to load the namespace I need to call a method registerNamespace
from Zend_Loader_Autoloader::getInstance()
, so I got this on top of the autoloader (I also tried putting it in bootstrap with no luck):
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace("Aws");
AWS Library Namespaces: Aws\namespace
The errors I receive are like Warning: include_once(Aws/Common/Aws.php): failed to open stream: No such file or directory in /srv/www_nfs_desarrollo/vhosts/desarrollo.techmaker.net/httpdocs/library/Zend/Loader.php on line 134
Full autoloader: http://pastebin.com/gS9mcntK
I've been struggling all day to work this out with no luck, any ideas?
source to share
To use $autoloader->registerNamespace('Aws')
, the AWS library you requested must be in the PHP include path, which probably includes the directory ./library
. Instead, you have an AWS lib tucked away in ./library/Eplan/AmazonCloudSearch
, which is almost certainly not on your PHP include_path.
Try moving the AWS library two levels directly into the directory ./library
.
source to share