symfony致命错误:require_once()bin//SymfonyRequirements.php
我已经在生产服务器上安装了Symfony 3.3.2。我可以从控制台运行命令symfony致命错误:require_once()bin//SymfonyRequirements.php,php,symfony,requirements,Php,Symfony,Requirements,我已经在生产服务器上安装了Symfony 3.3.2。我可以从控制台运行命令 $ ./bin/console --version Symfony 3.3.2 (kernel: app, env: dev, debug: true) 当我想用url检查服务器上的配置时,http://example.com/config.php,我有一个500错误“HTTP错误500” 当我尝试运行symfony_要求的命令时,出现了致命错误: $ php ./bin/symfony_requirements P
$ ./bin/console --version
Symfony 3.3.2 (kernel: app, env: dev, debug: true)
当我想用url检查服务器上的配置时,http://example.com/config.php
,我有一个500错误“HTTP错误500”
当我尝试运行symfony_要求的命令时,出现了致命错误:
$ php ./bin/symfony_requirements
PHP Warning: require_once(/var/www/symfony/bin/./SymfonyRequirements.php): failed to open stream: No such file or directory in /var/www/symfony/bin/symfony_requirements on line 4
PHP Stack trace:
PHP 1. {main}() /var/www/symfony/bin/symfony_requirements:0
PHP Fatal error: require_once(): Failed opening required '/var/www/symfony/bin/./SymfonyRequirements.php' (include_path='.:/usr/share/php') in /var/www/symfony/bin/symfony_requirements on line 4
PHP Stack trace:
PHP 1. {main}() /var/www/symfony/bin/symfony_requirements:0
如何检查服务器的配置?这是github上的一个问题 如果您无法升级symfony的版本,我建议您编辑文件web/config.php,并替换
require_once dirname(__FILE__).'/./SymfonyRequirements.php';
借
编辑bin/symfony_要求并进行完全相同的替换
如果您可以将您的版本升级到3.3.9,我就不会有这个问题我不知道是否可以升级symfony的版本,但您的技巧救了我:)
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';