Support the ongoing development of Laravel.io →
Installation Configuration

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
Last updated 2 years ago.
0

Copy ".env.example" to ".env" then run this command: "php artisan key:generate" to generate new APP_KEY

Last updated 8 years ago.
0

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

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kmrifat kmrifat Joined 23 Mar 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.