I use virtphp to create separate environments (different versions of PHP, extensions, etc.).
When I use the symfony command to start the local development server:
php app/console server:run
It seems to be ignoring the php.ini file of my virtual environment (~ / .virtenv / envs / myenv / etc / php.ini), for example: it does not load the extensions defined in this file.
But when I use the built-in php server directly , it works fine:
php -S 127.0.0.1:8000 --docroot=web/
What is the difference between the two commands or what makes symfony different?
This is the output of the php --ini :
Configuration File (php.ini) Path: /usr/local/etc/php/5.5 Loaded Configuration File: /Users/mjuarez/.virtphp/envs/wowfi/etc/php.ini Scan for additional .ini files in: /Users/mjuarez/.virtphp/envs/wowfi/etc/php Additional .ini files parsed: (none)
This is the result of the phpinfo() function in the Symfony controller when using the php app/console server:run command:
Configuration File (php.ini) Path /usr/local/etc/php/5.5 Loaded Configuration File /usr/local/etc/php/5.5/php.ini Scan this dir for additional .ini files /Users/mjuarez/.virtphp/envs/wowfi/etc/php Additional .ini files parsed (none)
Note the difference in the “Loaded configuration file” ... when I use the php --ini , it replaces the “Loaded configuration file” with the one in my php virtual environment, and when I use the php app/console server:run command php app/console server:run , it uses the "global" configuration file.
source share