需要使用Zend 1.8将图像上传到Amazon S3

I need to upload logo to Amazon S3 server using Zend 1.8.

I'm using Zend 1.8

Here is the code I have used for uploading the image to Amazon S3

$my_aws_key = $config->amazon->s3->key;
            $my_aws_secret_key = $config->amazon->s3->secret;
            //amazon.s3.bucket
            $bucket = $config->amazon->s3->bucket;       

            $s3 = new Zend_Service_Amazon_S3($my_aws_key, $my_aws_secret_key);
            $status = $s3->putObject("{$bucket}/{$this->_envCode}/{$filePath}", $content, 
                array(Zend_Service_Amazon_S3::S3_ACL_HEADER =>
                    Zend_Service_Amazon_S3::S3_ACL_PUBLIC_READ));
            if($status == true) {
                return "{$this->_envCode}/{$filePath}";
            }

The above code works perfectly in localhost. But not working in Server and also it doesn't show any errors.

Any help is greatly appreciated. Thanks in advance.