我有linux mint,当我尝试启动项目时出现错误: 此页面无法正常工作。
已执行以下命令:php app / check.php
表示一切正常,并且系统可以运行(您的系统已经可以运行Symfony项目)
在执行cache clear命令(或通过控制台的任何其他命令)时:
php app/console cache:clear --env=prod
或
php app/console cache:clear -e prod
我得到一个错误:
[RuntimeException] 工厂只能实例化\ Redis类:Redis问
langu2.loc.conf:
<VirtualHost *:80>
ServerName domain.tld
ServerAlias langu2.loc
DocumentRoot /var/www/langu2.loc/web
<Directory /var/www/langu2.loc/web>
AllowOverride None
Order Allow,Deny
Allow from All
Require all granted
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
</Directory>
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeeScript assets
# <Directory /var/www/langu2.loc>
# Options FollowSymlinks
# </Directory>
# optionally disable the RewriteEngine for the asset directories
# which will allow apache to simply reply with a 404 when files are
# not found instead of passing the request into the full symfony stack
<Directory /var/www/langu2.loc/web/bundles>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
ErrorLog /var/log/apache2/langu2_error.log
CustomLog /var/log/apache2/langu2_access.log combined
parameters.yml:
parameters:
database_host: 127.0.0.1
database_port: 3306
database_name: langu
database_user: root
database_password: 123456
admin_database_host: 127.0.0.1
admin_database_port: 3306
admin_database_name: langu
admin_database_user: root
admin_database_password: 123456
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
mailer_override_address: { }
secret: ThisTokenIsNotSoSecretChangeIt
google_client_id: null
google_client_secret: null
google_app_name: null
google_app_scopes: null
tokbox_api_key: null
tokbox_api_secret: null
tokbox_session_routed_mode: false
mangopay_client_id: null
mangopay_client_password: null
mangopay_base_url: null
mangopay_debug_mode: true
fixer_key: d7a2c4d1ad4672aafe12a35ef07426e3
langu_exchange_rate_fee: !!float 0
langu_wallets:
EUR:
wallet: 17988934
user: 17988933
GBP:
wallet: 17988936
user: 17988933
USD:
wallet: 17988935
user: 17988933
PLN:
wallet: 17988937
user: 17988933
refund_fee: 0.15
refund_compensation: 0.15
refund_deductions_limit: 0.5
snippets:
google_analytics: false
zopim: false
go_squared: false
hotjar: false
facebook: false
google_tag_manager: false
google_remarketing: false
autopilot: false
router.request_context.host: langu2.loc
router.request_context.scheme: http
redis.password: null
redis.port: 6379
liip_imagine_data_path:
- '%kernel.root_dir%/../web/uploads/'
- '%kernel.root_dir%/../web/images/'
- '%kernel.root_dir%/../uploads/'
main_domain: langu2.loc
allowed_mimetypes_lib:
- text/plain
- text/richtext
- application/rtf
- image/jpg
- image/jpeg
- image/png
- image/gif
- application/pdf
- video/avi
- video/msvideo
- video/mpeg
- video/H264
- video/ogg
- video/mp4
- audio/mp4
- audio/mpeg
- audio/ogg
- application/vnd.ms-excel
- application/msword
- application/vnd.oasis.opendocument.text
- application/vnd.oasis.opendocument.spreadsheet
- application/vnd.oasis.opendocument.presentation
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- application/vnd.ms-powerpoint
- application/vnd.openxmlformats-officedocument.presentationml.presentation
max_size_lib: 10485760
redis.yml:
snc_redis:
clients:
default:
type: phpredis
alias: default
dsn: redis://localhost
logging: false
session:
client: default
prefix: "session:php:"
composer.json
{
"name": "patryk/langu_2",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php",
"api/ApiKernel.php",
"api/ApiCache.php",
"admin/AdminKernel.php",
"admin/AdminCache.php"
]
},
"require": {
"php": ">=7.0",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"google/apiclient": "^2.1",
"troopers/mangopay-bundle": "^2.0",
"pinano/select2-bundle": "^4.0",
"liip/imagine-bundle": "^1.6",
"oneup/uploader-bundle": "^1.7",
"vich/uploader-bundle": "^1.6",
"ocramius/proxy-manager": "^1.0",
"nesbot/carbon": "^1.32",
"twig/extensions": "^1.4",
"webit/bcmath-bundle": "^1.2",
"opentok/opentok": "^2.4",
"debesha/doctrine-hydration-profiler-bundle": "^1.2",
"willdurand/js-translation-bundle": "^2.6",
"knplabs/knp-snappy-bundle": "^1.4",
"h4cc/wkhtmltopdf-amd64": "^0.12.3",
"cocur/slugify": "^2.3",
"sonata-project/doctrine-extensions": "^1.0",
"hampe/zurb-ink-bundle": "^2.2",
"suncat/mobile-detect-bundle": "^1.0",
"snc/redis-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^1.2",
"stof/doctrine-extensions-bundle": "^1.2",
"phpunit/phpunit": "^6.3",
"knplabs/knp-markdown-bundle": "^1.5",
"sonata-project/admin-bundle": "^3.12",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"sonata-project/user-bundle": "^3.2",
"sonata-project/easy-extends-bundle": "^2.1",
"sonata-project/intl-bundle": "^2.3",
"sonata-project/translation-bundle": "^2.1",
"friendsofsymfony/user-bundle": "^1.3",
"sonata-project/formatter-bundle": "^3.2",
"helios-ag/fm-elfinder-bundle": "~6",
"a2lix/translation-form-bundle": "~1.0",
"pusher/pusher-php-server": "^3.1",
"league/iso3166": "^2.1",
"autologic-web/redirect-bundle": "^0.2.2"
},
"require-dev": {
"sensio/generator-bundle": "~3.0",
"symfony/phpunit-bridge": "~2.7"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"bin-dir": "bin",
"component-dir": "web/assets"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": null
}
}