OFFLINE-GmbH / Online-FTP-S3

Online FTP / Amazon S3 Filebrowser
https://www.onlineftp.ch
191 stars 123 forks source link

S3 Connection problem #26

Open YoruhitP opened 6 years ago

YoruhitP commented 6 years ago

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

tobias-kuendig commented 6 years ago

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

YoruhitP commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 3 years ago

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 commented 3 years ago

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