Yii2.0 安装使用报错:yii\web\Request::cookieValidationKey must be configured with a secret key.

下载了Yii2.0的basic版,配置好apache之后,浏览器访问,出现如下错误:

Invalid Configuration – yii\base\InvalidConfigException

yii\web\Request::cookieValidationKey must be configured with a secret key.

这是因为未配置cookieValidationKey,这个配置项主要是为了防止cookie攻击的

该设置位于config下的web.php,自己随便设置一段字符串就好了。例如

‘cookieValidationKey‘ => ‘asdfgh123456‘,

  

原文地址:https://www.cnblogs.com/niuben/p/10744608.html

时间: 2024-11-02 15:36:47

Yii2.0 安装使用报错:yii\web\Request::cookieValidationKey must be configured with a secret key.的相关文章

JCE安装使用报错

"description":"No key was installed for encryption service","status":"NO_KEY" 错误描述 { "description": "No key was installed for encryption service", "status": "NO_KEY" } 错误原因: j

yii2.0 报错Cookievalidationkey Must Be Configured With A Secret Key

'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'test', //这里配置秘钥字符串就不会报错了 ]]

[Cordova+Sencha Touch] 移动开发1 sencha 2.4.0 + 在 安卓2.3.6上使用报错 - has no method 'bind'

Sencha Touch 2.3.2和2.4.0在安卓2.3上面用会报错,具体报错信息如下: 解决办法是: 打开文件:你的file:///android_asset/www/sencha-touch-all-debug.js 找到第76728行: if (Ext.feature.has.Touch) { // bind handlers that are only invoked when the browser has touchevents me.onTargetTouchMove = me

ipmitool使用报错Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

ipmitool使用报错处理 Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory 解决办法:需要加载相关模块 查看先关模块是否加载(可以看出模块未加载) #lsmod |grep ^ipmi 加载以下模块 # modprobe ipmi_watchdog # modprobe ipmi_poweroff # modprobe ipmi_devintf # m

使用报错:Fatal error in launcher: Unable to create process using '"'

在一个系统中共存Python2.python3的时候,pip.pip2.pip3使用的时候会报错: c:\Python35\Scripts>pip3Fatal error in launcher: Unable to create process using '"' 解决方法: python3: python3 -m pip install --upgrade pip python2: python2 -m pip install --upgrade pip 注意:python2, pyt

python pip使用报错:Fatal error in launcher: Unable to create process using '"'

系统win7 解决方法: python3: python3 -m pip install --upgrade pip python2: python2 -m pip install --upgrade pip 注意:python2, python3共存时,将python安装目录下的python.exe改成对应的python2.exe,python3.exe python pip使用报错:Fatal error in launcher: Unable to create process using

56-python pip使用报错:Fatal error in launcher: Unable to create process using '"'

在一个系统中共存Python2.python3的时候,pip.pip2.pip3使用的时候会报错: c:\Python35\Scripts>pip3Fatal error in launcher: Unable to create process using '"' 解决方法: python3: python3 -m pip install --upgrade pip python2: python2 -m pip install --upgrade pip 注意:python2, pyt

Android Fragment 嵌套使用报错

在新的SDK每次创建activity时,会自动生成 <pre name="code" class="java">public static class PlaceholderFragment extends Fragment fragment模块,在该模块的基础上进行嵌套fragment代码如下: <pre name="code" class="java">public static class Pla

UEditor使用报错Cannot set property &#39;innerHTML&#39; of undefined

仿用UEditor的setContent的时候报错,报错代码如下Uncaught TypeError: Cannot set property 'innerHTML' of undefined.调试ueditor.config.js,ueditor.all.js 提示me.body is undefined.(我就纳了闷儿了!同样的使用那个行这个咋就不行,那个有body,view,这个咋就这么少![我还查看了插件的内部函数,真是个good媛~])错误的原因是没有等UEditor创建完成就使用UE