WordPress.org

Ready to get started?Download WordPress

Forums

Amazon S3 Uploads
[resolved] Not SSL/HTTPS compatible (12 posts)

  1. Clifford Paulick
    Member
    Posted 2 years ago #

    Example:
    http://tourkick.com/2010/how-fast-youtube-speed/ has this image: http://tourkick.com/wp-content/uploads/2010/11/YouTube-Speed-Mbps.png which redirects to http://tourkick-uploads-8624c237.s3.amazonaws.com/2010/11/YouTube-Speed-Mbps.png, thanks to this plugin.

    However, if I load the https:// version of that page, the http:// version of the image is still loaded. (yes, at this time there are other SSL issues on the page but please disregard at this time.)

    And if I manually type https://tourkick.com/wp-content/uploads/2010/11/YouTube-Speed-Mbps.png, it redirects to http://tourkick-uploads-8624c237.s3.amazonaws.com/2010/11/YouTube-Speed-Mbps.png.

    It SHOULD point to https://s3.amazonaws.com/tourkick-uploads-8624c237/2010/11/YouTube-Speed-Mbps.png (notice the different URL format).

    More information/discussion about this topic in general (HTTPS s3) can be found here: http://stackoverflow.com/questions/3048236/amazon-s3-https-ssl-is-it-possible, which links here (http://joonhachu.blogspot.com/2010/09/helpful-tip-for-amazon-s3-urls-for-ssl.html) and here (http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html)

    Please let me know how I can help get this to completion, if help is desired or necessary, including if you need your own SSL certificate.

    Thank you!

    http://wordpress.org/extend/plugins/amazon-s3-uploads/

  2. atvdev
    Member
    Plugin Author

    Posted 2 years ago #

    I updated the .htacces and the S3 php class, so now it should work.

    However the different url format that you suggest, I think will not work for all the bucket regions, because for Europe buckets you must use https://bucket-name.s3.amazonaws.com/

    If you want an example the following image is on eu bucket
    https://media.matfashion.com.s3.amazonaws.com/wpshop/2012/01/8negrodjplugman8negro.jpg
    https://s3.amazonaws.com/media.matfashion.com/wpshop/2012/01/8negrodjplugman8negro.jpg

  3. Clifford Paulick
    Member
    Posted 2 years ago #

    Well that sure stinks on s3's part. I wish that worked in my region.
    Is it possible to have a selection box in the admin area of how https urls will be sourced?
    Or could you just detect the chosen bucket's region once authenticated?
    Or just let me specify the region manually and then the plugin will know which way to write secure urls?

    Personally, I can't use it without https working properly, so I hope this is doable.

    Many thanks.

  4. atvdev
    Member
    Plugin Author

    Posted 2 years ago #

    Code updated; it checks bucket's region and uses for EU buckets
    https://{bucket}.s3.amazonaws.com/{subdir}/2012/01/image.jpg
    and for the rest buckets
    https://s3.amazonaws.com/{bucket}/{subdir}/2012/01/image.jpg

    Could you do me a favor and check if it works on your side of our spinning Earth? :)

    Cheers!

  5. Clifford Paulick
    Member
    Posted 2 years ago #

    Looks like version 1.0 is still the one for download, not v1.01 or v1.02...

    Looking forward to the update! :)

    I'll let you know once wp-admin tells me there's an update.

  6. Clifford Paulick
    Member
    Posted 2 years ago #

    v1.03

    It seems to work partially...

    This image: https://tourkick.com/wp-content/uploads/2012/01/code2.png redirects to this URL https://tourkick-uploads-8624c237/2012/01/code2.png -- it's missing the s3.amazonaws.com/ part.

    Then I tried the URL I gave before (https://tourkick.com/wp-content/uploads/2010/11/YouTube-Speed-Mbps.png) and it worked sometimes and other times it was missing the s3.amazonaws.com/ part, like the first image I mentioned in this post.

  7. atvdev
    Member
    Plugin Author

    Posted 2 years ago #

    I updated the code for redirecting the files to Amazon.
    Please check it out and tell me if you have any issues.

  8. Clifford Paulick
    Member
    Posted 2 years ago #

    Still not working after the v1.05 update.
    It now redirects here:
    https://localhost/tourkick-uploads-8624c237/2012/01/code2.png

  9. atvdev
    Member
    Plugin Author

    Posted 2 years ago #

    The buckets locations and regions are documented very poorly and I tried creating a bucket in every region available to test the plugin. And the tests were ok exept for the region us-west-2, to which I can't connect even with S3Fox.

    Also, the regions for the buckets are a bit dumb as you can create a bucket with region 'EU' and with 's3-eu-west-1'. Both will work from 's3-eu-west-1' but the function getBucketLocation will give you 'EU' for the first and 's3-eu-west-1' for second.

    So could you post the contents of wp-content/uploads/.htaccess maybe I can find any clues?

  10. atvdev
    Member
    Plugin Author

    Posted 2 years ago #

    Could you update to 1.08, go to the wp-admin > plugins > Amazon S3 Uploads and after check if there is asssu-errorlog.txt in wp-content/plugins/amazon-s3-uploads?

    If that file exists, could you post its contents here?

  11. Clifford Paulick
    Member
    Posted 2 years ago #

    Sorry, been without reliable computer usage for too long now. Aagh.

    Here's the stuff:

    1) contents of wp-content/uploads/.htaccess after upgrading to v1.08 (I think no changes from v1.05):

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ http://tourkick-uploads-8624c237.s3.amazonaws.com/$1 [QSA,L]
    RewriteCond %{HTTPS} on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ https://s3.amazonaws.com/tourkick-uploads-8624c237/$1 [QSA,L]

    2) I visited tourkick.com / wp-admin / plugins.php?page=asssu-options. Then looked in wp-content/plugins/amazon-s3-uploads, in which there is no error file. However, there is a file 'wp-content/plugins/error_log', which contained this text (in addition to mentions of other unrelated errors):

    [23-Jan-2012 13:54:03] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [23-Jan-2012 16:14:34] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [23-Jan-2012 17:33:07] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [23-Jan-2012 23:19:24] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 00:23:30] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 01:40:32] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 02:15:48] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 02:46:26] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 09:34:24] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 09:34:44] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 10:34:59] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 14:39:47] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 14:53:10] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 15:07:57] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 16:09:40] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 16:19:31] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 16:26:02] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 23:04:25] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 23:07:01] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 23:32:18] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [24-Jan-2012 23:45:01] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 01:46:07] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 03:09:08] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 03:10:11] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 03:12:54] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 04:21:59] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 04:24:32] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 06:18:15] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 06:59:30] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 12:59:37] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 16:13:51] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query
    [25-Jan-2012 16:53:43] WordPress database error Unknown column 'site_url' in 'field list' for query INSERT INTO asssu_endpoints (site_url, location) VALUES("tourkick.com", "s3.amazonaws.com") made by require_once, require_once, include_once, AsssuPlugin->__construct, AsssuPlugin->configure, AsssuPlugin->get_endpoint, W3_Db->query

    3) I don't know what changed, exactly, but apparently everything's working now because http://tourkick.com/wp-content/uploads/2010/11/YouTube-Speed-Mbps.png goes to http://tourkick-uploads-8624c237.s3.amazonaws.com/2010/11/YouTube-Speed-Mbps.png, and https://tourkick.com/wp-content/uploads/2010/11/YouTube-Speed-Mbps.png goes to https://s3.amazonaws.com/tourkick-uploads-8624c237/2010/11/YouTube-Speed-Mbps.png, as desired.

    Does this info help?

  12. atvdev
    Member
    Plugin Author

    Posted 2 years ago #

    Yes I had bugs in the script creating the db, so the endpoints(bucket location) could not be saved and as effect htaccess was wrong

    but now it should be ok

    Thanks for your help

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic