Hello all, I'm a newbie of laravel framework. i build a laravel project it's work good in my localhost:800 port on **artisan **command. Now i'm trying to deploy it online. For this reason i create a folder called laravel in root directory. and paste my project on it(except public folder). I paste my public folder under public_html
And i also edit two line of index.php
require __DIR__.'/../laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/../laravel/bootstrap/app.php';
i also include
'key' => env('APP_KEY'),
'cipher' => 'AES-128-CBC',
in app.php file
my .eve.example file have this
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_URL=http://localhost/
But when i hit my domain it give e a error
No supported encrypter found. The cipher and / or key length are invalid.
in EncryptionServiceProvider.php line 31
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 735
at Container->build(object(Closure), array()) in Container.php line 633
Copy ".env.example" to ".env" then run this command: "php artisan key:generate" to generate new APP_KEY
When you specify
'cipher' => 'AES-128-CBC',
in your app.php, you just need a 128 bit key as value for APP_KEY.
Otherwise you can set like this to use a 256 bit key.
'cipher' => 'AES-256-CBC',
In both case you can solve the problem running the command: php artisan key:generate
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community