php - Amazon SDK overrides autoloader -
it seems aws sdk php overrides __autoload() function. undeclared classes can't found after including aws sdk.
require_once( "awssdkforphp/aws.phar" ); new classa();
classa() exists in __autoload() function code above gives error below.
fatal error: class 'classa' not found in /path/classa.php on line 2
removing require_once( "awssdkforphp/aws.phar" ); not give me error. sdk use installed through pear: https://github.com/aws/aws-sdk-php there solution this?
after
require_once( "awssdkforphp/aws.phar" );
reset autoloader spl_autoload
, , add aws autoloader using spl_autoload_register
require_once( "awssdkforphp/aws.phar" ); __autoload('spl_autoload'); spl_autoload_register(/* whatever find aws registers */);
Comments
Post a Comment