Giter VIP home page Giter VIP logo

Comments (9)

larslight11 avatar larslight11 commented on June 5, 2024 2

ok bro it works now thanks love you ...i just had to swap memory for my composer to work

from filegator.

alcalbg avatar alcalbg commented on June 5, 2024 1

The error message is clear enough, you don't have enough memory for composer to do the update.

Ok, maybe we can trick composer with this:

  • delete vendor folder rm -Rf vendor/
  • remove composer.lock rm composer.lock
  • open composer.json end make it look like this:
{
    "name": "filegator/filegator",
    "description": "Filegator",
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "monolog/monolog": "^1.24",
        "nikic/fast-route": "^1.3",
        "symfony/security-csrf": "^4.3",
        "symfony/http-foundation": "^4.2",
        "dibi/dibi": "^4.0",
        "php-di/php-di": "^6.0",
        "rakit/validation": "^1.1",
        "league/flysystem": "^1.0",
        "league/flysystem-ziparchive": "^1.0",
        "league/flysystem-aws-s3-v3": "^1.0"
    },
    "authors": [
        {
            "name": "Milos Stojanovic",
            "email": "[email protected]"
        }
    ],
    "autoload": {
        "psr-4": {
            "Filegator\\": "backend"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/backend/"
        }
    },
    "require-dev": {
        "phpunit/phpunit": "^7.5",
        "symfony/var-dumper": "^4.2",
        "league/flysystem-memory": "^1.0",
        "phpstan/phpstan": "^0.11.8"
    }
}

  • now run composer install

from filegator.

alcalbg avatar alcalbg commented on June 5, 2024

You should replace these lines in your configuration.php :

        'Filegator\Services\Storage\Filesystem' => [
            'handler' => '\Filegator\Services\Storage\Filesystem',
            'config' => [
                'separator' => '/',
                'config' => [],
                'adapter' => function () {
                    return new \League\Flysystem\Adapter\Local(
                        __DIR__.'/repository'
                    );
                },
            ],
        ],

with this:

        'Filegator\Services\Storage\Filesystem' => [
            'handler' => '\Filegator\Services\Storage\Filesystem',
            'config' => [
                'separator' => '/',
                'config' => [],
                'adapter' => function () {
                    $client = new \Aws\S3\S3Client([
                        'credentials' => [
                            'key' => '123456',
                            'secret' => 'secret123456',
                        ],
                        'region' => 'us-east-1',
                        'version' => 'latest',
                    ]);

                    return new \League\Flysystem\AwsS3v3\AwsS3Adapter($client, 'my-bucket-name');
                },
            ],
        ],

from filegator.

alcalbg avatar alcalbg commented on June 5, 2024

Make sure you enter your own S3 parameters:

  • key
  • secret
  • region
  • bucket name

If it doesn't work please check /private/logs/app.log to see what is the exact error

from filegator.

larslight11 avatar larslight11 commented on June 5, 2024

i get this in my app.log , after replacing the code in the configuration.php and the configuration_sample.php file.

[2019-10-29 02:09:27] default.ALERT: Fatal Error (E_ERROR): Uncaught Error: Class 'Aws\S3\S3Client' not found in /root/filegator/configuration.php:80 Stack trac$

i feel like when i installed the {composer require league/flysystem-aws-s3-v3} it wasnt in the right directory maybe??

because on the AWS side i gave all the permissions already to my S3 Bucket.So i know its nothing from that side .

Also i tried attaching a SFTP Adapter same error in my app.log

Thank you for your help so far , but please help me try solve this it will be well appreciated bro.

from filegator.

alcalbg avatar alcalbg commented on June 5, 2024

The error message is clear, you don't have S3Client installed or you've installed it wrong.

Run this again in your filegator folder, where your configuration.php file is:

composer require league/flysystem-aws-s3-v3

from filegator.

larslight11 avatar larslight11 commented on June 5, 2024

ok so i deleted the vendor folder first , because it didnt let me install composer unless i deleted the current vendor folder , then inside my filegator folder i installed {composer require league/flysystem-aws-s3-v3} again , and then updated my configuration.php file

filegator1

filegator2

filegator3

filegator4

and i get an HTTP 500 Error and its not working......

from filegator.

alcalbg avatar alcalbg commented on June 5, 2024

Put the original composer.json and composer.lock back and try in this order:

rm -Rf vendor/
composer install
composer require league/flysystem-aws-s3-v3

from filegator.

larslight11 avatar larslight11 commented on June 5, 2024

ok done put the original composer.json and composer.lock back already

then did this

rm -Rf vendor/

composer install

after composer install doesnt let me install {composer require league/flysystem-aws-s3-v3}

filegator5

i thinks its because when i do composer install it creates another vendor folder ......

from filegator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.