In most cases for the error PHP version: Not installed, when you manually run php.exe it throws MSVCR110.dll is missing. You should install Visual C++ Redistributable for Visual Studio 2012 - with the same architecture as downloaded php interpreter.
PHP version: Not installed
Unexpected/Incorrect PHP Version when running unit tests
ide - How can I set the PHP version in PHPStorm? - Stack Overflow
Can’t preview PHP files in PhpStorm (on Parrot OS Linux)
Videos
Hi, probably me doing something stupid but after much google-fu and delving in storm's preferences I still cannot crack it.
I am running a mac and use brew to install / switch between multiple PHP versions. In terminal I am running the expected PHP version (8.1):
$ which php
/opt/homebrew/opt/php/bin/php
$ /opt/homebrew/opt/php/bin/php -v
/opt/homPHP 8.1.7 (cli) (built: Jun 9 2022 14:08:46) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies
In Preferences -> PHP
I have PHP language level set to 8.1 and CLI Interpreter to my 8.1 executable location (which shows the correct version and xdebug version).
However, when I run my unit tests it is using my php 7.4 version.
So, you mean to highlight all pieces of code that will not work with the PHP version you are writing it in, right? That can be done here:
Preferences -> Languages & Frameworks > PHP
and the same on Mac:
PhpStorm -> Preferences (⌘,) -> Languages & Frameworks > PHP
Or with newer versions of PhpStorm in Windows:
File -> Settings -> Languages & Frameworks > PHP

then select your PHP version, for example, 7.0
This is very useful when your local system runs PHP 7.0, for example, but production is running PHP 5.5.
That way PhpStorm will warn you which parts will not work in production, show proper hints during writing code according to the selected version, etc.
In case your field is disabled.
Probably your settings "Synchronize IDE settings with composer.json" is enabled
You may change your PHP version in composer.json file
"require": {
"php": ">=7.1.0",
}
OR disable your settings in this path
File -> Settings -> Languages & Frameworks > PHP > Composer
*If you change your composer.json file - As Félix Gagnon-Grenier commented, Keep in mind it has effects on the way packages will be required later
Hi everyone,
I’m new here, just installed PhpStorm and I’m running it on Parrot OS (Linux).
I can preview .html files just fine, but I can’t get .php files to open in the browser or preview at all. I’ve tried setting up the PHP interpreter and a built-in server, but something’s still not working.
Could anyone please help me figure this out?
I’d really appreciate it if someone could walk me through the setup step-by-step or even connect to my PC remotely to take a look. I’m willing to send a PayPal thank-you to whoever can help me solve it.
Thanks so much in advance!
If this happens and you see the red I with PHPUnit Version not installed then you probably get the message "Please select PHP Interpreter to load PHPUnit version" when you press the refresh button.
If you have the path to phpunit.phar set and your path the composer autoloader is fine, then it is possible that PHPStorm simply doesn't get what PHP exe file to use to load the PHPUnit.
You can then choose to add a Remote PHP Interpreter but you may also choose to add a local PHP Interpreter (for instance if you have XAMPP or WAMPP or LAMPP installed on your computer).
Press Ctrl+Alt+S and go to -> Languages & Frameworks -> PHP -> CLI Interpreter -> go for the button with the dots (or shift + enter) and there you can add an "Interpreter" by pressing the + button.
I added my own local interpreter xampp\php\php.exe
Press apply and okay and go back to
Languages & Frameworks -> PHP -> Test Frameworks and go for the refresh button.
It should do some magic and then it will say PHPUnit version: 6.5 (or whichever you installed).
I had my local (XAMPP) Apache server running.
For anyone running into this in 2020 and also if you have problem with Docker container mapping, Path Mapping stay same if you select your Project root in Docker container option:
Just add double slash at your host path: //, looks like this is bug in PHPStorm.


[S O L V E D]
PRINTSCREEN => https://imgur.com/a/C3Op58R
Yo guys, i was building a products management panel using php.
The default php location is /usr/bin/php
But phpstorm and other programs cannot recognize the php executable on /usr/bin
I have vscode and phpstorm installed in my computer, then when i try to configure CLI interpreters on phpstorm or php executable's path on vscode with php server extensions they acts as if cant recognize php executable file on path, but i already have lastest php version installed !!
How can i solve it?
I really tried everything... but any of them worked :- Downgrading- Change executable's directory- Execute them as sudo- Reinstall php