[英]Symfony 4 Recaptcha bundle "public_key" at path "ewz_recaptcha" must be configured
I'm using symfony 4 and recaptcha bundle from https://packagist.org/packages/excelwebzone/recaptcha-bundle#v1.5.11 , but i don't know why it doesn't work.我正在使用来自https://packagist.org/packages/excelwebzone/recaptcha-bundle#v1.5.11 的symfony 4 和 recaptcha 包,但我不知道为什么它不起作用。 Below is the error i got.
下面是我得到的错误。 I configured env google recaptcha variables.
我配置了 env google recaptcha 变量。
The file "C:\\xampp\\htdocs\\projects\\symfony-template\\config/packages/ewz_recaptcha.yaml" does not contain valid YAML in C:\\xampp\\htdocs\\projects\\symfony-template\\config/packages/ewz_recaptcha.yaml (which is loaded in resource "C:\\xampp\\htdocs\\projects\\symfony-template\\config/packages/ewz_recaptcha.yaml").
文件“C:\\xampp\\htdocs\\projects\\symfony-template\\config/packages/ewz_recaptcha.yaml”在 C:\\xampp\\htdocs\\projects\\symfony-template\\config/packages/ewz_recaptcha.yaml 中不包含有效的 YAML (在资源“C:\\xampp\\htdocs\\projects\\symfony-template\\config/packages/ewz_recaptcha.yaml”中加载)。
yaml file: yaml文件:
ewz_recaptcha:
public_key: HIDDEN
private_key: HIDDEN
# Not needed as "%kernel.default_locale%" is the default value for the locale key
locale_key: %kernel.default_locale%
HIDDEN
equals keys from google, but i covered it here for security reasons. HIDDEN
等于来自 google 的密钥,但出于安全原因,我在这里介绍了它。
Notes:笔记:
First: You have to create config/packages/ewz_recaptcha.yaml
首先:您必须创建
config/packages/ewz_recaptcha.yaml
Second: YAML file have to valid format:第二:YAML 文件必须是有效的格式:
ewz_recaptcha:
public_key: "here is your public key (this is just example)"
private_key: "here is your private key (this is just example too)
# Not needed as "%kernel.default_locale%" is the default value for the locale key
locale_key: %kernel.default_locale%
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.