Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

S3 Connection problem #26

Open
YoruhitP opened this issue Aug 14, 2018 · 6 comments
Open

S3 Connection problem #26

YoruhitP opened this issue Aug 14, 2018 · 6 comments

Comments

@YoruhitP
Copy link

When connected to S3, "Can not connect to server!" Is displayed. What should I do?

@tobias-kuendig
Copy link
Member

Are you using the installation on onlineftp.ch or are you self hosting? Are you sure, that you entered the correct credentials?

@YoruhitP
Copy link
Author

YoruhitP commented Aug 16, 2018

I am using it at self hosting.
The Web server tried both nginx and Apache but it was the same result.
PHP is 7.2, node.js is 8.x, composer, gulp uses installable latest.

@tobias-kuendig
Copy link
Member

Replace the following part

https://github.com/OFFLINE-GmbH/Online-FTP-S3/blob/master/app/Http/Controllers/SessionController.php#L60

with

    protected function error($e)
    {
        info('Login error', [$e]);
        return redirect()->back()->withErrors(['connection' => 'Cannot connect to server!'])->withInput();
    }

Then check your storage/app/laravel.log file after logging in. Post the logged exception here.

This part of the error handling can definitely be improved.

@YoruhitP
Copy link
Author

I am thankful for the proposal.
However, it is currently in operation with another application that provides the same function, so it can not be tried immediately.
I will make the test environment again and inform you of the result.

@crysfel
Copy link

crysfel commented Apr 30, 2021

I'm getting this error:

[2021-04-30 21:15:37] production.INFO: Login error ["[object] (Aws\\S3\\Exception\\S3Exception(code: 0): Error executing \"ListObjects\" on \"https://s3.eu-central-1.amazonaws.com/my_bucket?prefix=&delimiter=%2F&encoding-type=url\"; AWS HTTP error: count(): Parameter must be an array or an object that implements Countable at /var/www/mycloud/app/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:192, ErrorException(code: 0): count(): Parameter must be an array or an object that implements Countable at /var/www/mycloud/app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:67)"]

Any idea what might be wrong?

Thanks

@tobias-kuendig
Copy link
Member

Your PHP version is too new. Either downgrade PHP or update the project's dependencies

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants