• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » PHP » How to install and handle MAMP on your MacOS
Next →
← Prev

How to install and handle MAMP on your MacOS

By Dinesh Thakur

In order to work with PHP, we must ensure that the prerequisites necessary for the implementation of programs. In the development context of web  applications, a web server with PHP is mandatory. The MAMP software (short for Macintosh, Apache, MySQL and PHP) will launch a local web server on a machine  running on the Mac OS X. It is a software for brand users with apple and which contains the following free components: Apache (server daemon), PHP5, MySQL  (DBMS, SQLite (DBMS), and PHPMyAdmin SQLiteManage (administration tools BDD).

We will show in this course how to install this software on Mac OS and use it for our first PHP applications.

We’ll be covering the following topics in this tutorial:

  • Download MAMP Software
  • Installing MAMP
  • First start of the software
  • The important directories MAMP
  • PHP first test
  • Database managers: PHPMyAdmin and SQLiteManager
  • MAMP widget
  •                                                  

Download MAMP Software

The first thing is of course to download MAMP software from the official website of MAMP at http://www.mamp.info/.

Download MAMP for MacOS

MAMP is available for Macintosh equipped with Motorola PowerPC or Intel chip.

Installing MAMP

After unzipping the Zip archive disk image (.dmg file). It is the installer software.

          MAMP Installer Dialog

Just do a “drag and drop” the MAMP folder window and drop it into the Applications directory thereof. That’s it MAMP is installed correctly. We note the MAMP folder (fitted gray logo) in the Applications directory MacOS (shortcut Command + Shift + A).

                                               Drag MAMP folder to Application folder

First start of the software

The launch of MAMP is done by clicking on the icon MAMP.app. A new window launches.

                                MAMP Control Window

This window allows you to control the web server (Apache) and database server (MySQL) have been launched. The green lights show a good operation. The Preferences tab allows you to configure MAMP.

The modifiable parameters are for example the ports behind which the server processes or the working directory where the projects are located (eg websites).

                                  MAMP Port Setting

It is recommended that the configuration imposed by MAMP for people without sufficient computer knowledge.

The startup MAMP also involves opening a new window in the web browser (Safari by default). This is the home page of MAMP. It also attests to the proper functioning of the local Web server.

                MAMP Home Page

Note first that to access the local web server, we use the URL http: // localhost: 8888 / MAMP. The localhost can be replaced with the IP address 127.0.0.1. The Web server listens for the LAN information on port 8888. Port 80 is reserved by default to the Web through the Internet.

The menu at the top provides access to phpinfo () (PHP configuration), utilities database management (PHPMyAdmin and SQLiteManager) as well as to a performance optimization PHP application (eAccelerator).

The important directories MAMP

The six important directories of MAMP are:

• / bin: directory containing executable Apache, PHP4, PHP5, MySQL5 and SQLite.
• / conf: directory containing Apache configuration file (httpd.conf), PHP (php.ini) and SQLiteManager (config.db).
• / tmp: directory containing the temporary files created by the executables. The / tmp / php include contains temporary files of PHP sessions.
• / db: directory containing MySQL5 and SQLite databases.
• / logs: directory containing the files of PHP error logs, Apache and MySQL.
• / htdocs: directory containing various website projects.

PHP first test

We will test our first PHP application: the traditional “hello world”. For this, we first create a new directory called PHP-Code in the / htdocs.

Then we put in this directory a file named hello.php that contains the following code:

Listing of hello.php: first PHP program

<html>
        <head>
               <title> Hello World PHP </title>
        </head>
                <body>
                      <p>
                             <?php echo 'Hello World!'; ?>
                      </p>
                </body>
</html>

 

In our browser, we call the file by entering the following URL: http: // localhost: 8888 /PHP-Code/hello.php. The PHP script is executed and displayed on the screen the text Hello World!. So PHP works perfectly.

Database managers: PHPMyAdmin and SQLiteManager

PHPMyAdmin

The free utility PHPMyAdmin is located at the following address: http: // localhost: 8888 / phpMyAdmin /. It allows to manage databases and tables MySQL SQL type.

                    mamp phpmyadmin

We return to this application when next tutorielss requiring the use of MySQL databases.

SQLiteManager

The free utility SQLiteManager is located at the following address: http: // localhost: 8888 / SQLiteManager /. It allows to manage databases and SQL tables SQLite.

                     MAMP SQLLite

We will return to this application at upcoming tutorials require the use of SQLite databases.

MAMP widget

                                                 

MAMP also offers a small widget to place in the Dashboard MacOS. This allows to monitor the status of Web servers and SQL; and restart them if necessary.

By clicking on the little exclamation point, it is possible to switch to 1 second PHP5 to PHP4. This is handy when you want to test the compatibility of an application.

You’ll also like:

  1. Write A C++ Program To Handle Bank Customer Data By Using Nesting Of Structure.
  2. How To Install An SSD
  3. How to install AngularJS
  4. How to Install Python on Windows
  5. How to Install WordPress Plugin
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

PHP Tutorials

PHP Tutorials

  • PHP - Home
  • PHP - Features
  • PHP - Magic Methods
  • PHP - Imagefilter
  • PHP - Arrays Numeric
  • PHP - Sessions
  • PHP - Forms Processing
  • PHP - clone()
  • PHP - Cookies
  • PHP - Variable Types
  • PHP - First program
  • PHP - call()
  • PHP - Iterator interface
  • PHP - Imports files
  • PHP - Exception Handling
  • PHP - set() and get()
  • PHP - Install MAMP
  • PHP - Functions
  • PHP - Constants Types
  • PHP - Comments Types
  • PHP - OOP's
  • PHP - OOps Use
  • PHP - PHP Code & Redirect 301
  • PHP - Control structures
  • PHP - Abstract Classes
  • PHP - Control structures
  • PHP - Classes
  • PHP - MySQL NULL values
  • PHP - Methods Visibility
  • PHP - Operator Types
  • PHP - Short tags Not use
  • PHP - Object and class
  • PHP - Secure Passwords

Other Links

  • PHP - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW