We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17459
    • 268 Posts
    About my server:
    MODX Revolution 2.3.1-pl (traditional)
    Ubuntu 14.04 LTS
    Linux denebola.entropia.us 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    nginx/1.6.2
    php5-fpm 5.6.0-1 http://denebola.entropia.us/info.php
    MariaDB 10.0
    curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3

    About my client:
    OS X 10.9.5, Chrome 38.0.2125.101 beta, /dev/hands, /dev/brain

    In Modx error.log:
    [2014-10-03 02:13:38] (WARN @ /home/lorddaedra/www/hotels-bank.com/core/model/modx/sources/modfilemediasource.class.php : 945) PHP notice: Undefined variable: size
    [2014-10-03 02:13:42] (WARN @ /home/lorddaedra/www/hotels-bank.com/core/model/aws/lib/requestcore/requestcore.class.php : 610) PHP notice: Use of undefined constant CURLOPT_CLOSEPOLICY - assumed 'CURLOPT_CLOSEPOLICY'
    [2014-10-03 02:13:42] (WARN @ /home/lorddaedra/www/hotels-bank.com/core/model/aws/lib/requestcore/requestcore.class.php : 610) PHP notice: Use of undefined constant CURLCLOSEPOLICY_LEAST_RECENTLY_USED - assumed 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED'
    [2014-10-03 02:13:42] (ERROR @ /home/lorddaedra/www/hotels-bank.com/core/model/aws/lib/requestcore/requestcore.class.php : 610) PHP warning: curl_setopt() expects parameter 2 to be long, string given


    Screenshot of S3 bucket settings in attachments...

    I've uploaded some files to S3 via AWS but do not see them in Modx...

    Please, provide hotfix or describe how to hack requestcore.class.php ? [ed. note: Lord Daedra last edited this post 12 years ago.]
      • 17459
      • 268 Posts
      I opened nginx error.log file and found this:

      2014/10/03 08:49:36 [error] 23770#0: *56382 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'cURL_Exception' with message 'cURL resource: Resource id #14; cURL error: SSL: no alternative certificate subject name matches target host name 'code.hotels-bank.com.s3.amazonaws.com' (cURL error code 51). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.' in /home/lorddaedra/www/hotels-bank.com/core/model/aws/lib/requestcore/requestcore.class.php:848
      Stack trace:
      #0 /home/lorddaedra/www/hotels-bank.com/core/model/aws/services/s3.class.php(723): RequestCore->send_request()
      #1 /home/lorddaedra/www/hotels-bank.com/core/model/aws/services/s3.class.php(1383): AmazonS3->authenticate('code.hotels-ban...', Array)
      #2 /home/lorddaedra/www/hotels-bank.com/core/model/modx/sources/mods3mediasource.class.php(110): AmazonS3->list_objects('code.hotels-ban...', Array)
      #3 /home/lorddaedra/www/hotels-bank.com/core/model/modx/sources/mods3mediasource.class.php(142): modS3MediaSource->getS3ObjectList('/')
      #4 /home/lorddaedra/www/hotels-" while reading response header from upstream, client: 128.68.59.15, server: hotels-bank.com, request: "POST /connectors/index.php?action=browser/directory/getList&id=/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "hotels-bank.com", referrer: "http://hotels-bank.com/manager/?a=system/event"

      Also I found this topic https://www.drupal.org/node/1673888

      "Error with bucket names containing dots (.) over SSL"... This is fixed in SDK 1.6.2, the path generated is slightly different.

      ModX use old SDK 1 (summer 2011)... Please, update SDK to latest https://github.com/amazonwebservices/aws-sdk-for-php at least (it's no longer in development anyway), much better, if you will update to SDK2 https://github.com/aws/aws-sdk-php

        • 17459
        • 268 Posts