After laravel is installed, the browser execution displays the following error, what should I do?

WBOY
Release: 2016-07-06 13:53:31
Original
1930 people have browsed it

After laravel is installed, the browser execution displays the following error, what should I do?

Whoops, looks like something went wrong.

1/1
RuntimeException in compiled.php line 7737:
No supported encrypter found. The cipher and / or key length are invalid.
in compiled.php line 7737
at EncryptionServiceProvider->getEncrypterForKeyAndCipher(null, 'AES-256-CBC') in compiled.php line 7727
at EncryptionServiceProvider->IlluminateEncryption{closure}(object(Application), array()) in compiled.php line 1353
at Container->build(object(Closure), array()) in compiled.php line 1309
at Container->make('encrypter', array()) in compiled.php line 1871
at Application->make('IlluminateContractsEncryptionEncrypter') in compiled.php line 1410
at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1387
at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1373
at Container->build('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1309
at Container->make('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1871
at Application->make('AppHttpMiddlewareEncryptCookies') in compiled.php line 9921
at Pipeline->IlluminatePipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->IlluminateRouting{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9911
at Pipeline->then(object(Closure)) in compiled.php line 8192
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8183
at Router->dispatchToRoute(object(Request)) in compiled.php line 8173
at Router->dispatch(object(Request)) in compiled.php line 2416
at Kernel->IlluminateFoundationHttp{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->IlluminateRouting{closure}(object(Request)) in compiled.php line 3283
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9926
at Pipeline->IlluminatePipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->IlluminateRouting{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9911
at Pipeline->then(object(Closure)) in compiled.php line 2363
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2347
at Kernel->handle(object(Request)) in index.php line 54
Whoops, looks like something went wrong.

1/1
RuntimeException in compiled.php line 7737:
No supported encrypter found. The cipher and / or key length are invalid.
in compiled.php line 7737
at EncryptionServiceProvider->getEncrypterForKeyAndCipher(null, 'AES-256-CBC') in compiled.php line 7727
at EncryptionServiceProvider->IlluminateEncryption{closure}(object(Application), array()) in compiled.php line 1353
at Container->build(object(Closure), array()) in compiled.php line 1309
at Container->make('encrypter', array()) in compiled.php line 1871
at Application->make('IlluminateContractsEncryptionEncrypter') in compiled.php line 1410
at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1387
at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1373
at Container->build('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1309
at Container->make('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1871
at Application->make('AppHttpMiddlewareEncryptCookies') in compiled.php line 2370
at Kernel->terminate(object(Request), object(Response)) in index.php line 58

回复内容:

After laravel is installed, the browser execution displays the following error, what should I do?

Whoops, looks like something went wrong.

1/1
RuntimeException in compiled.php line 7737:
No supported encrypter found. The cipher and / or key length are invalid.
in compiled.php line 7737
at EncryptionServiceProvider->getEncrypterForKeyAndCipher(null, 'AES-256-CBC') in compiled.php line 7727
at EncryptionServiceProvider->IlluminateEncryption{closure}(object(Application), array()) in compiled.php line 1353
at Container->build(object(Closure), array()) in compiled.php line 1309
at Container->make('encrypter', array()) in compiled.php line 1871
at Application->make('IlluminateContractsEncryptionEncrypter') in compiled.php line 1410
at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1387
at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1373
at Container->build('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1309
at Container->make('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1871
at Application->make('AppHttpMiddlewareEncryptCookies') in compiled.php line 9921
at Pipeline->IlluminatePipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->IlluminateRouting{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9911
at Pipeline->then(object(Closure)) in compiled.php line 8192
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8183
at Router->dispatchToRoute(object(Request)) in compiled.php line 8173
at Router->dispatch(object(Request)) in compiled.php line 2416
at Kernel->IlluminateFoundationHttp{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->IlluminateRouting{closure}(object(Request)) in compiled.php line 3283
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9926
at Pipeline->IlluminatePipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->IlluminateRouting{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9911
at Pipeline->then(object(Closure)) in compiled.php line 2363
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2347
at Kernel->handle(object(Request)) in index.php line 54
Whoops, looks like something went wrong.

1/1
RuntimeException in compiled.php line 7737:
No supported encrypter found. The cipher and / or key length are invalid.
in compiled.php line 7737
at EncryptionServiceProvider->getEncrypterForKeyAndCipher(null, 'AES-256-CBC') in compiled.php line 7727
at EncryptionServiceProvider->IlluminateEncryption{closure}(object(Application), array()) in compiled.php line 1353
at Container->build(object(Closure), array()) in compiled.php line 1309
at Container->make('encrypter', array()) in compiled.php line 1871
at Application->make('IlluminateContractsEncryptionEncrypter') in compiled.php line 1410
at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1387
at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1373
at Container->build('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1309
at Container->make('AppHttpMiddlewareEncryptCookies', array()) in compiled.php line 1871
at Application->make('AppHttpMiddlewareEncryptCookies') in compiled.php line 2370
at Kernel->terminate(object(Request), object(Response)) in index.php line 58

php artisan key:generate 在命令行生成一个key

把.env的配置 APP_KEY设置一下就可以了,我最近也在学遇到了一样的问题

APP_KEY 无效,配置正确的APP_KEY即可

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!