A. Mayotte A. Mayotte - 3 years ago 244
PHP Question

symfony Fatal error: require_once() bin/./SymfonyRequirements.php

I have installed Symfony 3.3.2 on a server in production. I can run command from console

$ ./bin/console --version
Symfony 3.3.2 (kernel: app, env: dev, debug: true)


When I want to check the config on my server with the url,
http://example.com/config.php
, I have a 500 error "HTTP ERROR 500"

When I try to run the command for symfony_requirements, I have fatal error :

$ 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


How can I check the configuration of my server ?

Answer Source

This is an issue on github https://github.com/sensiolabs/SensioDistributionBundle/issues/324

If you can not upgrade your version of symfony, I suggest you to edit the file web/config.php, and replace

require_once dirname(__FILE__).'/./SymfonyRequirements.php';

by

require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';

Edit bin/symfony_requirements and do exactly the same replacement.

If you can upgrade your version to 3.3.9, I should not have this issue

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download