Configure Artifact Phpstrom development environment under Mac

Source: Internet
Author: User
Tags install php php development environment

Reproduced from: http://www.ifun.cc/blog/2014/02/09/macxia-pei-zhi-shen-qi-phpstromkai-fa-huan-jing/

PHP is so popular that it must be studied. First have to find useful tools, see online great God are recommended artifact phpstorm, then I also chasing the herd, download a phpstorm 7.1. Usually work in the Mac system, so here is only the configuration of the Mac system artifact.

I don't have to say much about installing it.
Once the installation is successful, the next step is to run.
After running of course is to create a new project, simply a little, we create an empty project. Just said, is empty engineering, then we give it a little bit of material, a new PHP file, for the time being named index.

Then we give it a little bit of content, that is that, the simplest, with HelloWorld.

1
2
3
4
5
6 7 8

Then we click to run

A dialog box will appear

Here is an error that says no PHP interpreter was found. After you click 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 button behind, and then specify the PHP interpreter directory.

Click OK after the configuration is OK.

Once configured, there is an interpreter.

The configuration is theoretically complete, but if you click on the Chrome icon on the right side of the image below,

You're going to see 502 mistakes,

When you get back to Phpstorm, you'll see a warning that php-cgi didn't find it.

The solution is to install PHP yourself, without the Mac installation, so there is the PHP development environment. Installation is simple, run a command directly, need 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, and 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 to the right area of Phpstorm, and then click on your computer installed browser, will open the browser to display index.php content

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 the Xdebug helper.

To this end, the artifact Phpstorm for Mac has been configured to complete and can begin your PHP tour.

The time is hasty, inevitably have a lot of mistakes, still correct. If there is a problem, please leave a message or join the QQ technology group:< Crazy IT People >93916004

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.