We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    I have not been able to get an Amazon S3 bucket setup as a media source, everything looks right in the setup screen, but nothing appears in the file browser when I save the source ... no errors, nothing I can't even tell if it's trying to connect...

    Modx error log:
    
    [2012-02-24 19:20:23] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/model/aws/sdk.class.php : 27) PHP warning: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/root/.aws/sdk/config.inc.php) is not within the allowed path(s): (/var/www/vhosts/domian.com/httpdocs:/tmp)
    
    
    [2012-02-24 19:20:23] (ERROR @ /var/www/vhosts/domain.com/httpdocs/core/model/aws/lib/requestcore/requestcore.class.php : 817) PHP warning: set_time_limit() has been disabled for security reasons
    
    


    File(/root/.aws/sdk/config.inc.php) is not within the allowed path(s): huh darn straight it isn't!
    could set_time_limit() being disabled be causing this to not work?

    ideas?

    -sean
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 26503
      • 620 Posts
      Still fighting with this... got the correct credentials, now looking at the instance name....

      "
      Required. The URL to the Amazon S3 instance. Often http://myaccount.s3.amazonaws.com/ or https://s3.amazonaws.com/myaccount/. If you're having issues seeing thumbnails but it works properly, make sure the url ends with a slash.
      
      "

      What is that supposed to be?? the account ID, the login user name the account number? I can't find anything in the Amazon console that refers to an "instance name"

      no errors, nothing...

      getting frustrated.
        *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

        Sean Kimball CLP, CLS.
        Technical Director / Sr. Developer | BigBlock Studios
        ._______________________________________________.
        Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
        27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
        phone/fax: 905-426-5525
        • 26503
        • 620 Posts
        Sort of solved, there are 'gotchas' though.....

        I never did find the 'account/instance name' in the amazon console, luckily I managed to guess it, I dunno where it comes from because it isn't the user name, id or account id... anyway I was having trouble because my instance name and my bucket seem to be accessible a couple of different ways:

        I can access the bucket via:
        instance name = http://my-guessed-account.s3.amazonaws.com/
        bucket name = some-bucket-name

        but when I try to associate that to a file type TV it gives me the wrong link to the file in the bucket, I get :
        http://my-guessed-account.s3.amazonaws.com/some-file.txt
        when the actual url to the file is:
        http://some-bucket-name.s3.amazonaws.com/some-file.txt


        Finally I set it up like this:
        instance name = http://some-bucket-name.s3.amazonaws.com/
        bucket name = some-bucket-name

        and it seems to be behaving, though without the bucket name, it fails again. To my mind, that should not work set up like that...

        -sean
          *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

          Sean Kimball CLP, CLS.
          Technical Director / Sr. Developer | BigBlock Studios
          ._______________________________________________.
          Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
          27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
          phone/fax: 905-426-5525
          • 27749
          • 53 Posts
          Hi,
          did you change anything in the Bucket settings (ACL to Everyone etc.)? I am trying to get it working and since I have no idea of the account name I am a bit lost.
          Do you have a hint where to find it?
            • 26503
            • 620 Posts
            no I never did find an account name,. but all I have in the instance is the full url to the amazon bucket & the bucket name... [well the keys as well]
              *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

              Sean Kimball CLP, CLS.
              Technical Director / Sr. Developer | BigBlock Studios
              ._______________________________________________.
              Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
              27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
              phone/fax: 905-426-5525
              • 27749
              • 53 Posts
              :)

              Well - I am trying to get it working as a media source and tried almost everything.
              url: http://bucket-name.s3.amazonaws.com/
              bucket: bucket-name
              +key and secret_key

              What amazes (haha) me is that if I use the credentials in a client or firefox extension - it works. But as a media source in MODX I cant get a file-listing at all. sad
                • 26503
                • 620 Posts
                anything in the modx error log? seems to me that it did that at one point... not sure.

                do check your amazon permissions [though it shouldn't matter if you are just trying to connect.] ..

                hmmm also maybe the cache? I seem to remember something about that....
                  *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                  Sean Kimball CLP, CLS.
                  Technical Director / Sr. Developer | BigBlock Studios
                  ._______________________________________________.
                  Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                  27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                  phone/fax: 905-426-5525
                  • 33971
                  • 12 Posts
                  If anyone else stumbles across this, then it is also useful to mention that your bucket should not have periods in it e.g. assets.mydomain.com (which is handy for CNAMEs) as it causes issues with the SSL certificate (see https://forums.aws.amazon.com/thread.jspa?threadID=69108).

                  Make sure to clear your cache too
                    Digital bod.
                    • 2168
                    • 9 Posts
                    For all those who arrive here by search:

                    wiseguydigital is correct: your bucket name CANNOT have any periods in it. This detail kept me running around in digital circles for an inordinate amount of time.
                      • 7586
                      • 4 Posts
                      After a ton of searching I found a solution that worked for me for BUCKET NAMES WITH PERIODS IN THEM!

                      edit /core/model/aws/services/s3.class.php and update to be the following.

                      /**
                      * The DNS vs. Path-style setting.
                      */
                      #public $path_style = false;
                      public $path_style = true;


                      BAM! Everything works...

                      Should really make it easy to change this within modx's system settings....