在尝试安装CakePHP时,我收到有关更改salt和密码种子值的以下错误消息.我该如何更改这些值?
Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 684]
Notice (1024): Please change the value of 'Security.cipherSeed' in app/config/core.php to a numeric (digits only) seed value specific to your application [CORE\cake\libs\debugger.php, line 688]
Run Code Online (Sandbox Code Playgroud)
Leo*_*Leo 54
你只需按照它说:
yourInstallation*/app/config/core.phpSecurity.salt并更改一些随机字符(这是因为您的应用程序没有与十亿其他安装相同的安全种子,这将是一个严重的安全漏洞.Security.cipherSeed但只使用数字core.php 现在阅读core.php- 你会从中学到很多东西.
Tar*_*yay 21
转到CakePHP应用程序文件夹.
输入config文件夹并打开 core.php
你会在某处看到这些线条:
/**
* A random string used in security hashing methods.
*/
Configure::write('Security.salt', 'xxxxxxxxxxxxxxxxxxxxxxx');
Run Code Online (Sandbox Code Playgroud)
如果你的CakePHP版本是1.3或更高,那么这也将是:
/**
* A random numeric string (digits only) used to encrypt/decrypt strings.
*/
Configure::write('Security.cipherSeed', 'xxxxxxxxxxxxxxxxxxxxxxx');
Run Code Online (Sandbox Code Playgroud)
只需更改以下值:
Configure::write('Security.cipherSeed', 'xxxxxxxxxxxxxxxxxxxxxxx');
Run Code Online (Sandbox Code Playgroud)
至:
Configure::write('Security.cipherSeed', 'xxxxxxxxxxxxxxTxxxxxxxx');
Run Code Online (Sandbox Code Playgroud)
或任何你的选择.刚开始你也可以将整个值留空:
Configure::write('Security.cipherSeed', '');
Configure::write('Security.salt', '');
Run Code Online (Sandbox Code Playgroud)然后保存文件,你就完成了.