laravel 安装后浏览器执行显示如下错误,怎么办?

WBOY
发布: 2016-07-06 13:53:31
原创
1931 人浏览过

laravel 安装后浏览器执行显示如下错误,怎么办?

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

回复内容:

laravel 安装后浏览器执行显示如下错误,怎么办?

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即可

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!