PhpStorm doesn't recognize my PHP CLI executable!

This just isn't my day as far as configuring PhpStorm. In settings, under Languages & Frameworks > PHP > CLI Interpreter, when I enter the path to my PHP executable it says "PHP version: Not installed". (The path is C:\Users\[MYUSERNAME]\PHP\current\php.exe.) When I click the refresh icon next to the path I get the message "Failed to parse validation script output". There's nothing wrong with the executable. In cmd.exe I enter "php --version" and get this output:

PHP 7.4.3 (cli) (built: Feb 18 2020 17:29:57) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Restarting PhpStorm didn't help.

3 comments
Comment actions Permalink

OK, I should clarify that this is only a problem when editing IDE settings (i.e., at the welcome screen, go to Configure > Settings). When I open a project and go to settings it verifies my PHP installation.

1
Comment actions Permalink

Thanks for the update! That's true, this issue may appear in "Settings for new projects" configuration window.

Just in case, here is a ticket about it:

https://youtrack.jetbrains.com/issue/WI-51216

1
Comment actions Permalink
  • OK, I should clarify that this is only a problem when editing IDE settings (i.e., at the welcome screen, go to Configure > Settings). When I open a project and go to settings it verifies my PHP installation.

This tip REALLY needs to be in your installation instructions!

Put it here, like this

:2. Specify the PHP engine installation directory in the PHP Home field. Type the path manually or click the Browse button    and choose the location in the Choose PHP Home dialog box, that opens.

PhpStorm displays the version of the PHP engine detected in the specified folder and the debugger associated with this PHP engine in the php.ini file.

  • 2(a). If the message "Php version: not installed" appears and you know that you are pointing PhpStorm to the correct location of your PHP interpreter, try specifying that location in the File -> Settings dialog after creating a new project or opening an existing project. This is a known issue and we are working to fix it.

___

I just spent  well over two hours  trying to fix this, Googling multiple terms (you should see my search history on this!) and surfing Stack Overflow, Reddit, and every other relevant link that came up and THIS was the actual answer.

Until you fix it you need to let new users know that this may be their actual answer. 

 

 

0

Please sign in to leave a comment.