I'm still trying to get this module to upload a video (90mb). Latest issue is when I used it with the Video Module. I'm not sure if it is an incompatibility or a problem:

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /?q=file/ajax/field_video_attempt3/und/0/form-fQcHilCUg_iWO5J3YHR3HzGMsq1w3s8VpN_lYrTtVa4
StatusText: n/a
ResponseText:
Fatal error: Class 'AmazonS3' not found in /home/talloy/public_html/sites/all/modules/media_amazon/MediaAmazonS3StreamWrapper.inc on line 350
ReadyState: undefined

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

justafish’s picture

Have you installed awssdk and downloaded the Amazon SDK for PHP and putt it in sites/all/libraries/awssdk ?

dlthomas’s picture

I tried reinstalling everything but am still getting the same error. I also tried uploading a smaller video file (12mb) but still no luck

dlthomas’s picture

I uninstalled everything and tried again - I followed 'http://drupalcode.org/project/media_amazon.git/blob/45c3768:/README' exactly but I'm still getting the same error.

Has anybody else got this module to work with Video?

VisualFox’s picture

@dlthomas can you check the status report '/reports/status' and see if you don't have any error with AWSSDK?

VisualFox’s picture

Note to self: don't forget to clear cache is you enabled the awssdk module prior to install the Amazon SDK for PHP

dlthomas’s picture

@VisualFox I just checked and can't find any errors relating to awssdk. I've cleared the cache many times since installing it all. Does a similar upload to mine work for you guys?

VisualFox’s picture

@dlthomas I got able to upload an image. Previously I was getting the same error as you: "Class 'AmazonS3' not found" but clearing the cache solved this issue. Are you still getting the same error?

Next, I plan to try the video module so I will keep you posted.

I also noticed the degraded performance, even when I try to upload a small file and I wonder if that can be addressed by using the local storage as a temporary storage in some case.

mbopp’s picture

FWIW, I am receiving this error as well, and have trace my issue back to the libraries module. The awssdk library is not being loaded. Which is indicated in the status report. I think it's an issue with 'libraries_load' not successfully loading the library. Perhaps a bug in the required dev branch of libraries.

In my case clearing the cache presents me with the "Class not found" message.

mbopp’s picture

So as I was writing the previous post I got to thinking about the cache tables themselves and was curious if the "Flush all caches" was really clearing all tables. In my case the libraries cache(`cache_libraries`) table. So after a little investigation I confirmed that the table was not being cleared. So I manually removed the awssdk record from the table. And whalah. It successfully loaded the library, and all is well.

HTH

VisualFox’s picture

@mbopp glad that worked for you. Perhaps we should fill a report to the libraries module or the error message in the status report should provide a link to clear the cache_libraries entry?

heshanlk’s picture

Class 'AmazonS3' not found

Make sure you have clone it from the github

git clone https://github.com/amazonwebservices/aws-sdk-for-php.git awssdk

to awssdk folder in libraries.

justafish’s picture

Title: Class 'AmazonS3' not found » cache_libraries table not clearing
Project: Media: Amazon » Libraries API
Version: 7.x-1.0-beta3 » 7.x-2.x-dev

reassigning to libraries module

tstoeckler’s picture

Status: Active » Needs review

I can't reproduce this. Here is a patch which tests this. I'm not yet convinced we should actually commit this as it tests pretty core-y functionality. But we'll see whether it passes.

tstoeckler’s picture

Oops :)
Patch attached.

tstoeckler’s picture

Actually, let's use a patch that works. Passes locally.

tstoeckler’s picture

Title: cache_libraries table not clearing » Class 'AmazonS3' not found
Project: Libraries API » Media: Amazon
Version: 7.x-2.x-dev » 7.x-1.0-beta3

I also tested this behaviour by manually checking the cache_libraries table.
I am moving this back issue back to its original project. If you are sure this has to do with Libraries module please explain in detail the problem and how to reproduce.

tstoeckler’s picture

Status: Needs review » Active
justafish’s picture

Project: Media: Amazon » AmazonS3
Version: 7.x-1.0-beta3 » 7.x-1.0-beta4
justafish’s picture

Status: Active » Postponed (maintainer needs more info)

need more information as I can't reproduce this. Please make sure you have installed everything correctly with the awssdk module.

justafish’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I haven't received anymore reports of this, please open this issue back up if necessary.

zorax’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Closed (cannot reproduce) » Active

Hi,
I can't fill the form : admin/config/media/amazons3
when I put the default bucket name, I have this error :
Fatal error: Class 'AmazonS3' not found in ...\amazons3-7.x-1.x-dev\amazons3\amazons3.module on line 100

I run PHP Version 5.3.8
AWS SDK : sdk-1.5.0.1

I have uninstalled :
libraries 7.x-2.0-alpha2
AWS SDK for PHP 7.x-5.0
Amazon S3 7.x-1.x-dev

and reinstalled them but, I have the same error.
I try with the module Amazon S3 7.x-1.0-beta5, but the error is the same?
Regards,

justafish’s picture

You probably don't have the SDK in your libraries folder. Please try the latest beta-6 also.

justafish’s picture

Status: Active » Closed (cannot reproduce)

Closing due to inactivity.

rajeevmatrix’s picture

Title: Class 'AmazonS3' not found » Cannot load AmazonS3 class. Please check the awssdk is installed correctly

Hi,

I am using the Amazon S3 in one of my site. But when i am going to save the default bucket name i am getting following error:
Cannot load AmazonS3 class. Please check the awssdk is installed correctly

Although i have installed all libraries as per instructions correctly.

I am new in drupal. Any help will appreciate.

Thanks in advance.

rajeevmatrix’s picture

Hi,

I have solved the issue myself just only you can set the

$conf['aws_key'] = '...';
$conf['aws_secret'] = '...';
$conf['aws_account_id'] = '...';
$conf['aws_canonical_id'] = '...';

follwoing credential in your settings.php

/drupaltest/sites/default/settings.php
enter above code at the end of your settings.php file with your aws credentials.

$conf['aws_key'] = '...';
$conf['aws_secret'] = '...';
$conf['aws_account_id'] = '...';
$conf['aws_canonical_id'] = '...';

Hope this is helpfull for some one.

Thanks

balashine’s picture

Hi all,

I enable all the modules related the Amazon in the drupal,

Libraries also enabled( Latest library)

There is no error in the status report in the admin

In file systeom Amazon simple storage service is missing to select the file system

i am not able to upload the image in my page

i am getting the error

Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 441 of /mnt/www/iKiteSurf/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 441 of /mnt/www/iKiteSurf/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in drupal_chmod() (line 2150 of /mnt/www/iKiteSurf/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in drupal_chmod() (line 2150 of /mnt/www/iKiteSurf/includes/file.inc).
The file could not be uploaded.

can any one please help me to solve this issue

benbiles’s picture

Issue summary: View changes

Hi , I also get the same kind of errors as balashine..

I have awssdk installed in sites/all/libraries/awssdk

could this be something wrong with libraries module ?

Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_writable(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 446 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in drupal_chmod() (line 2230 of /home/sites/benbiles.com/public_html/includes/file.inc).
One or more problems were detected with your Drupal installation. Check the status report for more information.

benbiles’s picture

my status report brings up even more errors !

Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_writable(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 446 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in drupal_chmod() (line 2230 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: XMLWriter::openUri(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: XMLWriter::openUri(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: XMLWriter::openUri(s3://xmlsitemap/NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM/1.xml): failed to open stream: No such file or directory in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: XMLWriter::openUri(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: XMLWriter::openUri(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: XMLWriter::openUri(s3://xmlsitemap/NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM/1.xml): failed to open stream: No such file or directory in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: XMLWriter::openUri(): xmlNewTextWriterFilename : cannot open uri in XMLSitemapWriter->openUri() (line 39 of /home/sites/benbiles.com/public_html/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_writable(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 446 of /home/sites/benbiles.com/public_html/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "s3" - did you forget to enable it when you configured PHP? in drupal_chmod() (line 2230 of /home/sites/benbiles.com/public_html/includes/file.inc).