Answer the question
In order to leave comments, you need to log in
Symfony 3.0.1 Why isn't config.yaml updated?
Good afternoon. Installed Symfony 3.0.1 It seems that everything is set up, but for some reason it does not respond to changes in config.yaml, it always tries to connect to MySQL, although I set it to PostgreSQL driver (pdo_pgsql) in the config.yml file and even changed the IP to check . On any doctrine command, it says:
[Doctrine\DBAL\Exception\DriverException]
An exception occured in driver: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)
Although, when executing the command described below (php bin/console cache: clear --env=prod), my driver was not correctly registered, he had a fight, I changed it, and he said that the cache was successfully deleted. It turns out that he sees the updated config, but Doctrine does not?
It always gives IP 127.0.0.1, again not reacting to my changes. Clearing the cache with the command (php bin/console cache:clear --env=prod), does not help.
Everything works on VirtualBox + Vagrant (Apache). Ubuntu 14.04.
Answer the question
In order to leave comments, you need to log in
Do you have any idea what is responsible for what in a standard Symfony project?
/app_dev.php - Application entry point for debugging. Open it and see how it works.
/app.php (/) - Production entry point.
What is the difference? A lot of things, including the cache, which is "off" in the dev, test environment. This will be the reason for the 404th in the browser when entering through app.php
Further... The parameters of the base and other heresy of the environment are configured not in config.yml, but in parameters.yml. It is there that all appearances and passwords for the database, keys and other parameters that may differ on different hosts.
Next... Since you have all this running in a virtual machine, and in it on Vagrant, then read about solving problems with this set of tools, for example here:
symfony.com/doc/current/cookbook/configuration/ove...
https://habrahabr.ru/post/212663/
and in Google on request "symfony vagrant box"
(Also take into account changes in framework versions)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question