mlwebact
Member
- Affected version
- 2.2.5
I'm new to xenforo. I have a client and his website uses xenforo v2.2.5 and he asked me to set up aws s3 for him. I've followed this post but it is not working. Every time I set up it doesn't let me log in to the admin panel. Here is the config.php source code that I'm using:
And also if I put
And on the admin login page, I get this error:
So, I'm really hoping if anyone can help me.
PHP:
<?php
$config['db']['host'] = '********';
$config['db']['port'] = '********';
$config['db']['username'] = '********';
$config['db']['password'] = '********';
$config['db']['dbname'] = '********';
$config['fullUnicode'] = true;
$s3 = function()
{
return new \Aws\S3\S3Client([
'credentials' => [
'key' => '***********************',
'secret' => '***********************************'
],
'region' => 'us-east-2',
'version' => 'latest',
'endpoint' => 'https://s3.us-east-2.amazonaws.com'
]);
};
$config['fsAdapters']['data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'bucket_name.s3.us-east-2.amazonaws.com', 'data');
};
$config['externalDataUrl'] = function($externalPath, $canonical)
{
return 'https://bucket_name.s3.us-east-2.amazonaws.com/data/' . $externalPath;
};
$config['fsAdapters']['internal-data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'bucket_name.s3.us-east-2.amazonaws.com', 'internal_data');
};
And also if I put
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'bucket_name', 'data');
as mentioned in the docs it gives a 500 Server Error. So I'm using return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 'bucket_name.s3.us-east-2.amazonaws.com', 'data');
And on the admin login page, I get this error:
So, I'm really hoping if anyone can help me.