Unable to get it to work. #35

Closed
grappler opened this Issue Nov 9, 2013 · 18 comments

Comments

Projects
None yet
4 participants
@grappler

grappler commented Nov 9, 2013

Hi,

I installed both plugins, I added the two keys in the wp-config(I think this is a great idea,). I am able to select the bucket.

The issue is when I upload a file it does not display in my s3 bucket.

What can I do to test for the issue?

I have WP_DEBUG on and I see no errors. These are my server details:

    ** SERVER DATA **
PHP Version:                5.4.19
MySQL Version:              5.5.31-log
Server Software:            Apache/2.2.24 (FreeBSD) DAV/2 mod_ssl/2.2.24 OpenSSL/1.0.1e mod_hcgi/0.9.4

    ** PHP CONFIGURATION **
Safe Mode:                  No
Memory Limit:               256M
Upload Max:                 16M
Post Max:                   16M
Time Limit:                 30
Max Input Vars:             1000
Display Errors:             On
Sessions:                   Disabled
Session Name:               PHPSESSID
Cookie Path:                /
Save Path:                  /tmp
Use Cookies:                On
Use Only Cookies:           On
FSOCKOPEN:                  Your server supports fsockopen.
cURL:                       Your server supports cURL.
SOAP Client:                Your server has the SOAP Client enabled.
SUHOSIN:                    Your server does not have SUHOSIN installed.
@bradt

This comment has been minimized.

Show comment
Hide comment
@bradt

bradt Nov 11, 2013

Member

What region is your bucket in? I've had reports that it currently only works with the "US Standard" region.

Member

bradt commented Nov 11, 2013

What region is your bucket in? I've had reports that it currently only works with the "US Standard" region.

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Nov 11, 2013

I am using the US standard zone, I have seen some other plugins have that
as an option.

I am using the US standard zone, I have seen some other plugins have that
as an option.

@bradt

This comment has been minimized.

Show comment
Hide comment
@bradt

bradt Nov 11, 2013

Member

Can you send me a screenshot of your Amazon S3 and CloudFront settings page?

Member

bradt commented Nov 11, 2013

Can you send me a screenshot of your Amazon S3 and CloudFront settings page?

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Nov 11, 2013

There is not much to see other then this text.

Access Keys

You’ve already defined your AWS access keys in your wp-config.php. If you’d prefer to manage them here and store them in the database (not recommended), simply remove the lines from your wp-config.

I can send you my aws keys if that would help.

There is not much to see other then this text.

Access Keys

You’ve already defined your AWS access keys in your wp-config.php. If you’d prefer to manage them here and store them in the database (not recommended), simply remove the lines from your wp-config.

I can send you my aws keys if that would help.

@bradt

This comment has been minimized.

Show comment
Hide comment
@bradt

bradt Nov 11, 2013

Member

Are both plugins activated? There should be a screen like this:
http://wordpress.org/plugins/amazon-s3-and-cloudfront/screenshots/

Member

bradt commented Nov 11, 2013

Are both plugins activated? There should be a screen like this:
http://wordpress.org/plugins/amazon-s3-and-cloudfront/screenshots/

@grappler

This comment has been minimized.

Show comment
Hide comment

Yes,
image

@bradt

This comment has been minimized.

Show comment
Hide comment
@bradt

bradt Nov 12, 2013

Member

Have you tried disabling all your other plugins and enabling the WordPress default theme? This will check to see if it's a problem with your other plugins or your theme.

Member

bradt commented Nov 12, 2013

Have you tried disabling all your other plugins and enabling the WordPress default theme? This will check to see if it's a problem with your other plugins or your theme.

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Nov 12, 2013

Just doing it. What is the best test to check that it is working?

Just doing it. What is the best test to check that it is working?

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Nov 12, 2013

I disabled all plugins and enabled TwentyTwelve and uploaded a 30sec video and a image and I don't see them in my Bucket.

I disabled all plugins and enabled TwentyTwelve and uploaded a 30sec video and a image and I don't see them in my Bucket.

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Nov 12, 2013

Ok, I found out that allow_url_fopen was not enabled. After enabling it I am getting Access Denied. I am not sure why.

[Tue Nov 12 20:30:08 2013] [error] [client 85.1.199.219] FastCGI: server "/var/run/hcgi/5405" stderr: Error uploading /home/developy/www/site.ch/dev/wp-content/uploads/2013/11/Chrysanthemum.jpg to S3: Access Denied, referer: http://site.ch/dev/wp-admin/media-new.php

Ok, I found out that allow_url_fopen was not enabled. After enabling it I am getting Access Denied. I am not sure why.

[Tue Nov 12 20:30:08 2013] [error] [client 85.1.199.219] FastCGI: server "/var/run/hcgi/5405" stderr: Error uploading /home/developy/www/site.ch/dev/wp-content/uploads/2013/11/Chrysanthemum.jpg to S3: Access Denied, referer: http://site.ch/dev/wp-admin/media-new.php
@imassingham

This comment has been minimized.

Show comment
Hide comment
@imassingham

imassingham Nov 26, 2013

I have the same symptoms. Looking at my httpd error log, I see the following entry whenever I attempt to upload something:

Error uploading /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/2013/11/m-m.jpg to S3: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint: "MyBucketName.s3.amazonaws.com"., referer: http://the-new-it.com/wp-admin/media-new.php

Any ideas what's causing this?

Also tried recreating the bucket in the US standard region, but this still results in the same error message when I attempt to upload a new image.

I have the same symptoms. Looking at my httpd error log, I see the following entry whenever I attempt to upload something:

Error uploading /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/2013/11/m-m.jpg to S3: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint: "MyBucketName.s3.amazonaws.com"., referer: http://the-new-it.com/wp-admin/media-new.php

Any ideas what's causing this?

Also tried recreating the bucket in the US standard region, but this still results in the same error message when I attempt to upload a new image.

@TheUnknownJG

This comment has been minimized.

Show comment
Hide comment
@TheUnknownJG

TheUnknownJG Jan 21, 2014

I believe I have the answer for you guys. You need to include a leading '/' in the object path. Even though the screenshot on the plugin page and the default value that is in there does not include this this - it appears to be necessary. At least for the S3.

I was also getting the S3: Access Denied error when it tried to copy the file to my S3 account. I added the leading forward slash - problem solved!

I believe I have the answer for you guys. You need to include a leading '/' in the object path. Even though the screenshot on the plugin page and the default value that is in there does not include this this - it appears to be necessary. At least for the S3.

I was also getting the S3: Access Denied error when it tried to copy the file to my S3 account. I added the leading forward slash - problem solved!

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Jan 21, 2014

@TheUnknownJG What host are you using? Did you set something special up on AWS?

@TheUnknownJG What host are you using? Did you set something special up on AWS?

@TheUnknownJG

This comment has been minimized.

Show comment
Hide comment
@TheUnknownJG

TheUnknownJG Jan 22, 2014

Nope - nothing special. I used a standard Bitnami Ubuntu AMI to set up my stack.

Did that change work for you?

Nope - nothing special. I used a standard Bitnami Ubuntu AMI to set up my stack.

Did that change work for you?

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Jan 22, 2014

@TheUnknownJG Ok, I tried your solution on a site on Siteground but it did not work. I do not know where to start debugging the issue as I do not get any error messages.

@TheUnknownJG Ok, I tried your solution on a site on Siteground but it did not work. I do not know where to start debugging the issue as I do not get any error messages.

@TheUnknownJG

This comment has been minimized.

Show comment
Hide comment
@TheUnknownJG

TheUnknownJG Jan 27, 2014

not even any error messages in the httpd error log? that is where I discovered that my issue was access denied.

not even any error messages in the httpd error log? that is where I discovered that my issue was access denied.

@grappler

This comment has been minimized.

Show comment
Hide comment
@grappler

grappler Jan 27, 2014

SOLVED IT!!!! 😂

I have started to write a blog post and will link it here too.

The problem was with the bucket policy.

SOLVED IT!!!! 😂

I have started to write a blog post and will link it here too.

The problem was with the bucket policy.

@grappler grappler closed this Jan 31, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment