tutorial on configuring PHPSTROM development environment method under Mac

Source: Internet
Author: User
Tags php development environment
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.

12345678

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.

Related Article

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.