Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
alvaroarregui  
#1 Posted : Wednesday, September 8, 2010 7:11:30 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Well, I´ve been trying to install the Aurigma Media Cloud Manager and all my tried lead to nowhere... After I set up the parameters I end up with the same error and I have no clue about what to do or how to fix it. We are trying to test this software and see how it works before we buy it but we can't get it working. Here is the error:
Code:
faultCode0faultStringNotice:Uninitialized string offset: -1 in /home/aarregui/public_html/asipensamos/administrator/components/com_aurigmacloudmediamanager/helpers/amazons3manager.php on line 180faultCode0faultStringFatal error:SOAP Fault: (faultcode: soapenv:Client.RequestTimeTooSkewed, faultstring: The difference between the request time and the current time is too large.) in /home/aarregui/public_html/asipensamos/administrator/components/com_aurigmacloudmediamanager/helpers/amazons3manager.php on line 296


Could you please tell me how to fix this please?
Dmitry.Obukhov  
#2 Posted : Wednesday, September 8, 2010 2:51:44 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Thanks for contacting us.

You experience the problem:
Quote:
The difference between the request time and the current time is too large.

Please check time settings on your server and correctness of the time zone.

If you have any additional question, I will be glad to assist you.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#3 Posted : Thursday, September 9, 2010 6:22:45 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

I know that one solution is to sync the server with S3 using ntp, but since we are hosting more than one website on our servers we'd like to know if there is an other solution to this problem...
Dmitry.Obukhov  
#4 Posted : Thursday, September 9, 2010 6:24:14 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Unfortunately, there is no another way to resolve this problem.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#5 Posted : Friday, September 10, 2010 5:09:11 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Ok then... Well, whats the difference of time length that I'm allowed to have before counting as not synchronized? 1 hour? 1 minute? 1 second?

Thanks.
Dmitry.Obukhov  
#6 Posted : Sunday, September 12, 2010 8:04:44 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Unfortunately, I am not able to assist you with this question. If you can, please check it experimentally.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#7 Posted : Thursday, September 23, 2010 7:19:48 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Well, I just had to add 5 secs to $timestamp = time(). Now, there is something else that I'd like to figure out: When I upload a picture and try to access it via the link ex. http://XXXXXXX.s3.amazonaws.com/test/image.gif the image has to be downloaded... Is there a way for the image to be shown on the browser instead of downloading it?
Dmitry.Obukhov  
#8 Posted : Thursday, September 23, 2010 5:29:51 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Amazon S3 returns Content-Type of all uploaded files as binary/octet-stream. Therefore, these files is being downloaded instead of shown on browser window. Unfortunately, it is not available to fix it.

Edited by user Tuesday, September 28, 2010 2:49:21 PM(UTC)  | Reason: Not specified

Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#9 Posted : Monday, September 27, 2010 7:08:12 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Okay... Would it be possible to change the Content-Type to MIME?
Dmitry.Obukhov  
#10 Posted : Tuesday, September 28, 2010 3:27:47 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Our developer have fixed it. You should add Before Upload event where you will add field Content-Type with value image/jpeg:
Code:

   function Before_upload() {
    getImageUploader('ImageUploader1').AddField('Content-Type', 'image/jpeg');
   }

Also, it is required to put additional field in the Policy, which is located in AmazonS3Helper.cs file:
Code:

[ 'starts-with', '$Content-Type', '' ]

Please note that this resolution is suitable to use for Image Uploader which imbed with JavaScript library only, but not with ASP.NET control nor PHP library.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#11 Posted : Wednesday, September 29, 2010 6:34:48 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Those are great news! I was starting to look at s3cmd to see if I could find a solution myself. I guess I have one more question, where am I supposed to place that function? And don't you mean amazons3manager.php? That's the only file where I could find 'starts-with' (I used grep on the entire com_aurigmacloudmediamanager directory)
Dmitry.Obukhov  
#12 Posted : Wednesday, September 29, 2010 1:22:19 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Sorry for my fault.

You should put additional field in static function construct_policy($bucket, $expiration_date, $acl, $key) function:
Code:

  static function construct_policy($bucket, $expiration_date, $acl, $key) {
    // See about policy construction
    // http://docs.amazonwebservices.com/AmazonS3/2006-03-01/dev/HTTPPOSTForms.html#HTTPPOSTConstructPolicy
    $expiration_date = gmdate("Y-m-d\TH:i:s.000\Z", $expiration_date);
    $policy = "{ 'expiration': '$expiration_date',
                'conditions': [
                  { 'acl': '$acl' },
                  { 'bucket': '$bucket' },
                  { 'success_action_status': '200' },
                  [ 'starts-with', '$"."key', '' ]
		          [ 'starts-with', '$Content-Type', '' ]
                ]
              }";

    // Encode policy UTF-8 bytes using Base64 and return.
    return base64_encode($policy);
  }

It is located in AmazonS3manager.php file.

As for BeforeUpload event. This event is located in iuembed.AmazonS3.js file (\Aurigma Cloud Media Manager\Aurigma Cloud Media Manager\admin\assets\). You should add this line in the AmazonS3Extender.prototype._control$BeforeUpload = function() method:
Code:

AmazonS3Extender.prototype._control$BeforeUpload = function() {	
//…… Code……
var iu = getImageUploader(this._writer.id);
iu.AddField('Content-Type', 'image/jpeg');
//…… Code……
}

Please let me know if you have any additional questions about it.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#13 Posted : Thursday, September 30, 2010 5:07:17 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Well, I did exactly as you said and I'm getting this error:
Code:
faultCode0faultStringNotice:Undefined variable: Content in /home/aarregui/public_html/asipensamos/administrator/components/com_aurigmacloudmediamanager/helpers/amazons3manager.php on line 312

Have I done something wrong?

Edited by user Thursday, September 30, 2010 5:08:23 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#14 Posted : Thursday, September 30, 2010 4:08:35 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

It was my fault. Sorry for this.
There is not comma after [ 'starts-with', '$"."key', '' ] field. Please add comma like in these lines:
Code:

[ 'starts-with', '$"."key', '' ],
[ 'starts-with', '$Content-Type', '' ]
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#15 Posted : Friday, October 1, 2010 5:38:03 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Hello,

I had already noticed that but it didn't really help at all, I'm still getting the same error...

Thank you.
Dmitry.Obukhov  
#16 Posted : Sunday, October 3, 2010 1:28:40 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Alvaro,

Our developer made changes in iuembed.AmazonS3.js and AmazonS3manager.php files. Tests shown that it worked okay - images were shown in the browser window but not downloaded.

You can find these files in the attachment to this post. Please download them and replace yours files with the new ones.

If you have any problems, please let me know about them.
File Attachment(s):
AmazonS3.zip (7kb) downloaded 4 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
alvaroarregui  
#17 Posted : Monday, October 4, 2010 7:57:44 AM(UTC)
alvaroarregui

Rank: Newbie

Groups: Member
Joined: 9/8/2010(UTC)
Posts: 9

Yup, it's working fine now. The error was because of the single apostrophe here
Code:
[ 'starts-with', '$Content-Type', '' ]

instead of using:
Code:
[ 'starts-with', '$"."Content-Type', '' ]


Any ways, now that we got this working I guess that my boss will like to take a look at it. Thank you for the support Dimitry.
Dmitry.Obukhov  
#18 Posted : Monday, October 4, 2010 11:42:18 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Alvaro,

You are right about the reason of error. Thanks for your comment.

If you have any questions or problems I will be glad to assist you.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.