没有支持的加密程序发现问题 [英] No supported encrypter found issue

查看:140
本文介绍了没有支持的加密程序发现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的控制器

当我将我的表单发布在我的laravel(5.2)上时,我得到这个, / strong>

  class WsRegisterController extends Controller {

public function register()
{
$ wsregistration = Input :: all();
$ wsUserName = Input :: get('name');
$ wsUserEmail = Input :: get('email');
$ wsUserPassword = Input :: get('password');

/ *检查用户是否是机器人* /

$ wsrules = [
//'g-recaptcha-response'=> 'required | recaptcha',capthcha
'name'=> 'required | min:2 | max:32',
'email'=> 'required | email',
'password'=> 'required | alpha_num | min:8'
];

$ wsvalidator = Validator :: make($ wsregistration,$ wsrules);

if($ wsvalidator-> passed()){

/ *检查电子邮件地址是否退出* /

$ wsUser_count =用户:: where('email','=',$ wsUserEmail) - > count();

// return $ wsUser_count;出口;

if($ wsUser_count> 1){

return Redirect :: to('/ test') - > with(array('error_msg'=>此电子邮件地址存在,请使用其他电子邮件地址。

}
}
}
}

所以我尝试使用这个链接,但仍然无法使用



CONFIG / APP.PHP FILE

  / * 
| -------------------------- ------------------------------------------------
|加密密钥
| ------------------------------------------- -------------------------------
|
|该键由照明加密服务使用,应设置为
|到一个随机的32个字符的字符串,否则这些加密的字符串
|不会安全在部署应用程序之前,请执行此操作!
|
* /

'key'=> env('o / tPhyhKmuLoJMWXZeV8b10OFoCT62z6WKuC3HO5Jbw ='),// env('9TSL9BsEjZyoM9BjX9du0XaLnCDi4m4Z'),

'cipher'=> 'AES-128-CBC',//'AES-256-CBC',

.ENV FILE

  APP_KEY = base64:o / tPhyhKmuLoJMWXZeV8b10OFoCT62z6WKuC3HO5Jbw = 
APP_URL = http:// localhost

我甚至做了这个artisan命令来生成新的密钥 php artisan key:generate 请问我是谁做错了@everyone。



不支持加密器发现错误快照

解决方案

感谢@everyone为您的支持但我已经解决了。

 'key'=> '9TSL9BsEjZyoM9BjX9du0XaLnCDi4m4Z',// env('9TSL9BsEjZyoM9BjX9du0XaLnCDi4m4Z'),'cipher'=> 'AES-256-CBC',

php artisan config:cache / p>

有魔法。


When i post my form on my laravel (5.2) i get this when it has to return some value to the former page.

MY CONTROLLER

class WsRegisterController extends Controller{

public function register()
{
    $wsregistration = Input::all();
    $wsUserName = Input::get('name');
    $wsUserEmail = Input::get('email');
    $wsUserPassword = Input::get('password');

    /* Check if user is a bot */

    $wsrules = [
    // 'g-recaptcha-response' => 'required|recaptcha', capthcha
    'name'   => 'required|min:2|max:32',
    'email'  => 'required|email',
    'password' => 'required|alpha_num|min:8'
    ];

    $wsvalidator = Validator::make($wsregistration, $wsrules);

    if ($wsvalidator->passes()) {

        /* Check if the email address exits */

        $wsUser_count = User::where('email', '=', $wsUserEmail)->count();

        // return $wsUser_count; exit;

        if ( $wsUser_count > 1 ) {

            return Redirect::to('/test')->with(array('error_msg' => 'This email address exist, please use another email address.'));

        }
     }
   }
  }

So i tried stackoverflowing it with this link but it is still not working

CONFIG/APP.PHP FILE

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/

'key' => env('o/tPhyhKmuLoJMWXZeV8b10OFoCT62z6WKuC3HO5Jbw='),// env('9TSL9BsEjZyoM9BjX9du0XaLnCDi4m4Z'),

'cipher' => 'AES-128-CBC',//'AES-256-CBC',

.ENV FILE

APP_KEY=base64:o/tPhyhKmuLoJMWXZeV8b10OFoCT62z6WKuC3HO5Jbw=
APP_URL=http://localhost

I even did this artisan command to generate new key php artisan key:generate please what did i do wrong @everyone.

No supported encrypter found error snapshot

解决方案

Thanks @everyone for your support but i have solved it.

'key' => '9TSL9BsEjZyoM9BjX9du0XaLnCDi4m4Z',// env('9TSL9BsEjZyoM9BjX9du0XaLnCDi4m4Z'), 'cipher' => 'AES-256-CBC',

php artisan config:cache

Did the magic.

这篇关于没有支持的加密程序发现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆