This article is mainly to share with you MAC configuration Phpstrom development Environment Method Tutorial, first we download a Phpstorm 7.1. Usually the work is in the Mac system, so here only the Mac system artifact configuration.
Installation I won't have to say more.
After the installation is successful, run it next.
After running is of course creating a new project, simply a little, we create an empty project. Just said, is empty project, then we add material to it, a new PHP file, named index.
Then we give it something, that's it, the simplest, with HelloWorld.
Then we click Run
A dialog box will appear
There is an error below that the PHP interpreter was not found. After clicking Fix, the following dialog box appears:
See, interpreter settings. Mac system is installed by default PHP, directory is in/usr/bin, then we click on the following button, and then specify the PHP interpreter directory.
Click OK after configuring.
Once configured, there is an interpreter.
In theory this configuration is done, but if you click on the Chrome icon in the right
You will see 502 errors,
Back to Phpstorm, you'll see a warning that php-cgi didn't find it.
The solution is to install PHP yourself, no Mac installation, so there is a PHP development environment. Installation is simple, run a command directly, take a few minutes, please wait slowly.
1 |
curl-s http://php-osx.liip.ch/install.sh | bash-s 5.5 |
The newly installed PHP directory is/usr/local/php5/bin, then set up the newly installed PHP interpreter in Phpstorm: Phpstorm->preferences->php will come to the Interpreter Settings page
Set up the PHP interpreter we installed:/usr/local/php5/bin
This configuration is complete, put the mouse in the Phpstorm right area, and then click on your computer installed browser, will open the browser to display the contents of index.php
If you want to trigger debugging from a Web page, you need to install the plugin. I'm using chrome and I need to install Xdebug helper.
To this, artifact Phpstorm for Mac has been configured to finish and can start your PHP trip.