我正在尝试安装fosuserbudle而我正在逐步完成,但是使用github上提供的文档,我发现了这个问题并且我不知道如何修复它:
LENOVO@LENOVO-G500DC /c/wamp/www/pfe (master)
$ php app/console cache:clear
致命错误:Class' Symfony \ Component \ Console \ Input \ ArgvInput'在C:\ w中找不到 第17行的放大器\ www \ pfe \ app \ console
调用堆栈: 0.0000 236552 1. {main}()C:\ wamp \ www \ pfe \ app \ console:0
答案 0 :(得分:0)
您应该更新您的问题,但是对于您的错误SQLSTATE [HY000] [2002],它与您的数据库配置有关。检查端口号是否正确:3306和你的parameters.yml中的主机,如果这没有帮助向我们展示你的参数.yml
像这样更新你的parameters.yml: 不需要支架。而且没有逗号需要。
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: symfony
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
database_path: null
答案 1 :(得分:0)
config.yml 进口: - {resource:parameters.yml} - {resource:security.yml} - {resource:services.yml}
framework:
#esi: ~
translator: ~
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id: ~
fragments: ~
http_method_override: true
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
# jar: "%kernel.root_dir%/Resources/java/compiler.jar"
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
# Doctrine Configuration
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }
#FOS UserBundle
fos_user:
db_driver: orm
firewall_name: main
user_class: Acme\UserBundle\Entity\User