Issue
I have a Fedora 36 operating system and I installed PHP with the yum package
src="https://i.stack.imgur.com/ApCCA.png" alt="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
.
Solution
In PhpStorm you can configure a CLI Interpreter by following the steps below:
- Click the menu at the top left of the window labeled "file".
- Select the menu item with the name "Settings" in the dropdown menu,
- In the side menu of the window that opened, click the "PHP" menu item.
- 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.
- In the "CLI Interpreters" window that just open there should be a
+
icon in the top left, press that+
icon. - In the dropdown that appears select "Other Local..."
- 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
) - After pasting you press the Refresh button to the right of the "PHP executable:" labelled input.
- Press the "Apply" button and then the "OK" button in the bottom of the "CLI Interpreters" window.
- 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
- 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:
Answered By - Sicet7 Answer Checked By - David Marino (WPSolving Volunteer)