Using DigitalOcean Spaces or Amazon S3 for file storage

Using DigitalOcean Spaces or Amazon S3 for file storage

No permission to download
What version of XF are you currently running?

Not my forum, but it is one I'm setting this up for:
It's XF 2.2.17, using PHP 8.1.31. I'm getting numerous Guzzle related class not found errors trying to load every page. I've disabled the add-on and commented out the code in config.php until I can resolve it. Was there something changed in 2.2.17?
 
I literally used the add-on on 2.2.17 last week with no issues. I’m pretty sure those Guzzle classes shouldn’t be there.

I recommend:

Commenting out the config, uninstalling the add-on, deleting all of its files (preferably the XFAws folder directly from the server), reinstalling version 2.4.0 of the add-on and re-enabling the config and trying again.
 
Just checked this class and function and all is present and correct and as it should be. This leads me to believe you may have an add-on which itself is including a different version of Guzzle to the one we ship.

So first step is to comment out the config.php stuff, disable all add-ons, re-enable the add-on, uncomment the config, and test again. I’m guessing it will work. Then re-enable each add-on to figure out which one causes the issue.

@Chris D the 2.4.0 version of this addon ships with psr/http-message v2.0, while XenForo 2.2.x ships with psr/http-message v1.0.1

Addon v2.4.0:

JSON:
            "name": "psr/http-message",
            "version": "2.0",

XenForo v2.2.x:

JSON:
             "name": "psr/http-message",
            "version": "1.0.1",

The difference between the two being the function definition in the interface:

PHP:
@@ -37,7 +38,7 @@ interface UriInterface
     * @see https://tools.ietf.org/html/rfc3986#section-3.1
     * @return string The URI scheme.
     */
    public function getScheme();
    public function getScheme(): string;

I believe that this is what is causing the conflict.

I note that v2.3.0 of this addon did not ship with psr/http-message at all, so would not have caused any issues.

Can I suggest that you re-release this addon with psr/http-message locked to v1.0.1 for compatibility with XF 2.2.x ?
 
Hi, short question.
The ressource mentioned that S3 is supported in XF 2.3 without plugin?


Is there an official documentation on how to set it up? Or is the setup the same as with this plugin? I didn't find anything in the Admin Panel nor in the xenforo documentation.

Is there some guide how I would do this on an existing forum with xf 2.3? I would appreciate your help.

Thanks.
 
The steps in the resource are the same for both 2.2 and 2.3. It’s just for 2.3 you don’t have to install the add-on.
 
The steps in the resource are the same for both 2.2 and 2.3. It’s just for 2.3 you don’t have to install the add-on.
Is there a guide or tutorial on how to build or use Amazon S3/Minio on XenForo Resource Manager without a plugin?

Can Minio work with this?

I'm sorry for asking again
 
Not sure what Minio is but if it has an S3 compatible API then yes, that will work.

To clarify, this isn't a "plugin" exactly - for 2.2 it just makes the Amazon S3 SDK available which is the necessary code for communicating with S3 compatible APIs.

The only difference between 2.2 and 2.3 is that the SDK (a much smaller version) is included by default in XF 2.3.
 
Not sure what Minio is but if it has an S3 compatible API then yes, that will work.

To clarify, this isn't a "plugin" exactly - for 2.2 it just makes the Amazon S3 SDK available which is the necessary code for communicating with S3 compatible APIs.

The only difference between 2.2 and 2.3 is that the SDK (a much smaller version) is included by default in XF 2.3.
Thank you for the explanation!

Could you take a look at this?

Minio (README):
MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads. To learn more about what MinIO is doing for AI storage, go to AI storage documentation.

Because I would like to build a storage host server to use Minio without Amazon S3. Not sure if that will work with XenForo 2.3.0 and to up 2.3.5
 
@Chris D the 2.4.0 version of this addon ships with psr/http-message v2.0, while XenForo 2.2.x ships with psr/http-message v1.0.1

Addon v2.4.0:

JSON:
            "name": "psr/http-message",
            "version": "2.0",

XenForo v2.2.x:

JSON:
             "name": "psr/http-message",
            "version": "1.0.1",

The difference between the two being the function definition in the interface:

PHP:
@@ -37,7 +38,7 @@ interface UriInterface
     * @see https://tools.ietf.org/html/rfc3986#section-3.1
     * @return string The URI scheme.
     */
    public function getScheme();
    public function getScheme(): string;

I believe that this is what is causing the conflict.

I note that v2.3.0 of this addon did not ship with psr/http-message at all, so would not have caused any issues.

Can I suggest that you re-release this addon with psr/http-message locked to v1.0.1 for compatibility with XF 2.2.x ?

@Chris D we're running into this same issue as well, is this something that is going to be addressed in a release?

I've updated it on a version of the build we have, but that isn't going to help other people, I'd be happy to upload that if needed so you can update the release here. I'd imagine this add-on should be marked as unmaintained though if issues aren't being addressed
 
Last edited:
The resource is maintained, but the add-on is not. It's no longer needed for XenForo 2.3, but the guide is relevant.

The AWS SDK that was shipped in the "add-on" no longer supports below PHP 8.1 so I'm re-releasing today pinned to the last versions supported that will be usable by XenForo 2.2.

There will be no further releases after this and the recommendation is to upgrade to XenForo 2.3.

Thank you @Sim for discovering the issue.
 
Last edited:
  • Like
Reactions: Sim
XenForo updated Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.1 & XF 2.2 with a new update entry:

Final release for XenForo 2.2

Due to an issue, we are releasing a new version of the add-on to support customers running XenForo 2.2 and older versions of PHP.

This is the last supported release due to XenForo 2.2 no longer being supported and this being the last version of the AWS SDK that can be supported by XenForo 2.2.

We continue to recommend the following:
  • We recommend upgrading to XenForo 2.3 at the earliest opportunity
  • This add-on can be safely removed if you are running XenForo 2.3 as this ships...

Read the rest of this update entry...
 
Back
Top Bottom