WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Amazon S3 Uploads] Not SSL/HTTPS compatible

[Resolved] [Plugin: Amazon S3 Uploads] Not SSL/HTTPS compatible

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author atvdev

    @atvdev

    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

    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.

    Plugin Author atvdev

    @atvdev

    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!

    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.

    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.

    Plugin Author atvdev

    @atvdev

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

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

    Plugin Author atvdev

    @atvdev

    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?

    Plugin Author atvdev

    @atvdev

    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?

    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?

    Plugin Author atvdev

    @atvdev

    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

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] [Plugin: Amazon S3 Uploads] Not SSL/HTTPS compatible’ is closed to new replies.