ez components and AWS PHP SDK makes ez components freak out
Posted
by
David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2011-01-08T11:29:56Z
Indexed on
2011/01/12
13:53 UTC
Read the original article
Hit count: 526
Hi,
I try to work with ez Components and AWS PHP SDK at the same time.
I have a file called resize.php which is just handling resizing images using the ez Components ImageTransition tools.
I queue the image for resize in Amazon AWS SQS. If I load the AWS PHP SDK and ez Components in the same file, PHP always complains about not finding the ez Components classes.
Code looks something like this:
amazonSQS.php:
require 'modules/resize.php';
require 'modules/aws/sdk.class.php';
$sqs = new AmazonSQS();
$response = $sqs->send_message($queue_url, $message);
resize.php:
function resize_image($filename) {
$settings = new ezcImageConverterSettings(
array(
//new ezcImageHandlerSettings( 'GD', 'ezcImageGdHandler' ),
new ezcImageHandlerSettings( 'ImageMagick', 'ezcImageImagemagickHandler' ),
)
);
Error message:
Fatal error: Class 'ezcImageConverterSettings' not found in /home/www.com/public_html/modules/resize.php on line 10
If I call resize.php from another PHP file which has AWS not included, it works fine.
I load ezComponents like this:
require 'ezc/Base/ezc_bootstrap.php';
It is installed as a PEAR package.
Any idea someone?
© Stack Overflow or respective owner