I am currently trying out Laravel Forge. To date, I have failed to complete a successful deployment.
To try to achieve success, I have created a new laravel project. No changes have been made to the shell project. Version is Laravel v8.17.0 (PHP v7.3.11).
The project was uploaded into a new repo on Bitbucket.
A server was created by Forge on AWS with PHP 7.3, a new VPC and a database. The default site was connected to the Bitbucket repo, with project type General PHP / Laravel. Create Database was checked when creating the site. The deployment script has been left in its default state
I have tried with both Install Composer Dependencies checked and left unchecked.
When I try to deploy with Install Composer Dependencies checked, I am getting:
Fri Dec 4 08:34:15 UTC 2020
From bitbucket.org:hallwizard/forgetest
* branch master -> FETCH_HEAD
Already up to date.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: [32mfacade/ignition[39m
Discovered Package: [32mfideloper/proxy[39m
Discovered Package: [32mfruitcake/laravel-cors[39m
Discovered Package: [32mlaravel/tinker[39m
Discovered Package: [32mnesbot/carbon[39m
Discovered Package: [32mnunomaduro/collision[39m
[32mPackage manifest generated successfully.[39m
72 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Restarting FPM...
Illuminate\Database\QueryException
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = forgetest and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:678
674▕ // If an exception occurs when attempting to run a query, we'll format the error
675▕ // message to include the bindings with SQL, which will make this exception a
676▕ // lot more helpful to the developer instead of just the database's errors.
677▕ catch (Exception $e) {
➜ 678▕ throw new QueryException(
679▕ $query, $this->prepareBindings($bindings), $e
680▕ );
681▕ }
682▕
[2m+33 vendor frames [22m
34 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
When I try to deploy with Install Composer Dependencies unchecked, the deployment succeeds, but when I visit the site I get:
Warning: require(/home/forge/default/public/../vendor/autoload.php): failed to open stream: No such file or directory in /home/forge/default/public/index.php on line 34
Fatal error: require(): Failed opening required '/home/forge/default/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/forge/default/public/index.php on line 34
Any help would be greatly appreciated as I am getting very frustrated trying to get even the most basic site deployed.
Thanks
Nick