How to configure PhpStorm to run php files in Ubuntu

As I told before this article is based on the configuration of PhpStorm. You can not directly access php files just installing the software. Following the steps given below, you can make PhpStorm as your wonderful IDE for coding PHP. After installing PhpStorm, we have to configure some things to make it to run php files. Otherwise it will fail to run files and give errors. 

Step 1 :

Open your terminal and type following commands to install php CLI and CGI.
PHP CLI  -  Command-Line Interface for PHP (Ex: For creating standalone applications)
PHP CGI  -  Common Gateway Interface for PHP (Ex: For web applications)

sudo apt-get install php7.0-cli  or  sudo apt-get install php5-cli (According to your PHP version)

sudo apt-get install php7.0-cgi  or  sudo apt-get install php5-cgi (According to your PHP version)

sudo apt-get install php-xdebug (Providing debugging and profiling capabilities)

Step 2 :

Open PhpStorm and go to File > Settings > Languages & Framework > PHP.

  1. Select your PHP language level
  2. Select your CLI interpreter. Currently you will have "no interpreter" in that part. Normally after you installed cli, it is in the usr/bin folder as php. Select it.
  3. In the below dialog box, press + mark in left side and include your cli path. Final preview is given below.
  4. Click Apply and then click Ok.
Now you are done with configuring PhpStorm!

Admin Semoga Informasi Yang Diberikan Melalui Web Ini Dapat Bermanfaat Bagi Saudara/i

No comments for "How to configure PhpStorm to run php files in Ubuntu"