PhpStorm does not see the interpreter

Viewed 47

I have a Fedora 36 operating system and I installed PHP with the yum package

enter image description here

PhpStorm asked me to put the interpreter. But for some unknown reason PhpStorm tells me that there is no php file in the directory /usr/bin/ although by entering which php command in the terminal it says that this file is in the path /usr/bin/php.

1 Answers

In PhpStorm you can configure a CLI Interpreter by following the steps below:

  1. Click the menu at the top left of the window labeled "file".
  2. Select the menu item with the name "Settings" in the dropdown menu,
  3. In the side menu of the window that opened, click the "PHP" menu item.
  4. In the window you now have a input labeled "CLI Interpreter" to the right of that input there is a button with 3 dots(...) in it, click that button.
  5. In the "CLI Interpreters" window that just open there should be a + icon in the top left, press that + icon.
  6. In the dropdown that appears select "Other Local..."
  7. In the main part of the "CLI Interpreters" window you should now see a input labelled "PHP executable:" in that input you paste the path to your php executable(in this case /usr/bin/php)
  8. After pasting you press the Refresh button to the right of the "PHP executable:" labelled input.
  9. Press the "Apply" button and then the "OK" button in the bottom of the "CLI Interpreters" window.
  10. After that the "CLI Interpreters" window should close and you need to make sure the "CLI Interpreter" labelled input now has you PHP Version displayed
  11. After making sure, press "Apply" and "OK" in the bottom of the "Settings" window to finish the configuration of you interpreter.

Some images for context:

enter image description here

enter image description here

Related