Reputation: 843
In a Symfony 3.4 project which I develop using PhpStorm I use the PhpStorm Terminal Window for running the Symfony server like
php bin/console server:run
This works fine. However the terminal uses the PHP version that is set in the windows environment path variable.
I don't get it to use the PHP version configured in the project setting (Settings -> Languages & Frameworks -> PHP
) in the field CLI Interpreter
.
Why is the terminal ignoring this setting totally?
Upvotes: 2
Views: 1883
Reputation: 146410
You can configure the terminal for current project and set a custom PATH so php
runs whatever interpreter you want. Open the Settings dialogue and head to Tools/ Terminal.
I think the neatest option is to tweak Shell path like this:
"cmd" /k "PATH=C:\php-5.6.0-Win32-VC11-x64;%PATH%"
You can also do the obvious thing and edit the environment variables to set PATH
.
It works just fine but this variable totally overrides the parent PATH
and I couldn't find a way to just prepend my value (neither $PATH
nor %PATH%
work).
Some other ideas:
"cmd" /k
to load a custom configuration script.Upvotes: 1