Install and set up a PHP development environment with MAMP for MAC OS X

Source: Internet
Author: User
Tags php development environment phpmyadmin

The PHP page needs to be processed by the WEB server. Therefore, to use PHP for development in Dreamweaver, you need access to a PHP-enabled WEB server and MySQL database. PhpMyAdmin is also very useful, it is MySQL graphics interface. These three components are open source software that you can use to develop, test, and deploy WEB applications. And it's all free.

The Apache Web server and PHP are all preinstalled in Mac OS x. However, they are not enabled by default. Also, a preinstalled version of PHP lacks many useful features, and you need to install and configure MySQL separately. Unless you can easily use the command line in Terminal, it's much easier to install the integrated solution MAMP.

This section describes how to install MAMP on your Mac. Apache Web Server, MySQL, and phpMyAdmin will be installed through an operation.

Tools/Materials
    • Mac OS X
    • MAMP
Steps
  1. 1

    Open System Preferences, select Share

    Make sure Internet sharing is turned off.

    You can continue as long as MySQL is never installed in the system.

  2. 2

    Download the latest version of MAMP.

  3. Install after download is complete.

  4. Open "Applications" and locate the "MAMP" folder,

    Double-click Open folder to open "MAMP" program

  5. Pop-up Warning window,

    Select "Launch MAMP"

  6. The browser launches and displays a welcome page,

    You will find that the URLs in the browser address bar begin with "http://localhost:8888".

    ": 8888" string after "localhost"

    Indicates that the WEB server listens for requests through non-standard port 8888.

  7. Open the MAMP Control Panel and click on "Star Servers"

    The green light next to Apache server and MySQL server indicates that both servers are running.

  8. Click Preferences and select Ports from the top of the panel that opens.

    The panel shows Apache and MySQL running on ports 8888 and 8889, respectively.

  9. Click Set Web & MySQL Ports to & 3306.

    The number is changed to the standard port: Apache is 80,mysql for 3306.

    This makes it easier for you to develop with Dreamweaver.

    Click "OK" and follow the prompts to type your Mac password.

    MAMP will stop and restart both servers.

  10. When the two lights turn green again, click Open Start page.

    At this point, the MAMP Welcome page is re-loaded into the browser.

    This time, the URL "localhost" has no ": 8888", there is no ": 80"

    Because port 80 is the default value, adding ": 80" is not necessary, so it's okay not to add it.

    When using a non-standard port, simply use a colon followed by a number.

  11. Click the "Phpinfo" link in the MAMP menu.

    You will see a page that shows the PHP configuration information:

  12. At this point, you have successfully installed PHP, MySQL, and PhpMyAdmin.

    END
Precautions
    • Note: Step 9 is the most likely place to go wrong. If there are any other programs that are using port 80,apache, you will not be able to restart. If so, make sure that the share in step 1 is turned off. Another possibility is that Skype is using port 80. You can change the port in the "Advanced" section of "Skype Preferences"-try to use 42815 as an incoming port.

Install and set up a PHP development environment with MAMP for MAC OS X

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.