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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -