Apache Mamp



This is easier than you think. Just create your document root folder again and have MAMP point to it again. Please like and subscribe. MAMP installs a local server environment in a matter of seconds on your Windows or macOS computer. MAMP comes free of charge, and is easily installed. MAMP will not compromise any existing Apache installation already running on your system.

Mamp apache server starts then stops

MAMP is a free distribution package that makes it easy to install Apache Web Server, PHP, and MySQL. Before installing MAMP, you should turn off any other web servers and instances of MySQL you have running on your Windows machine.

  1. Download the latest version of MAMP:
  2. Run the downloaded file (e.g., MAMP_MAMP_PRO_4.1.exe) and click through the installation wizard.
    1. If prompted, you do not need to install MAMP PRO or Apple Bonjour.
    2. Accept the License Agreement.
    3. Leave the default for the installation directory (C:MAMP).
    4. Leave the default for the Start Menu folder (MAMP).
    5. Close the wizard when setup is finished.

Running MAMP on Windows

Careful!

Zen timer app. Be very careful to follow these steps exactly. MAMP can be finicky. If something goes wrong, often the easiest thing to do is uninstall MAMP and start the process over again.

To run MAMP..

  1. Navigate to C:MAMP in Windows Explorer and open MAMP.exe. If you get a security alert, allow access. You should see a window like this one: The servers (Apache Server and MySQL Server) should have automatically started. If they did not, start them by clicking on Start Servers.
  2. Open MAMP Preferences:
  3. Change the Apache port to 8888:
  4. Click on Open WebStart Page: The following page should open in your browser:

Class Files

  1. After downloading the class files, create a folder in C:MAMPhtdocs named 'Webucator' and extract your class files in that folder:
  2. Rename the ClassFiles folder to php:
  3. To test that your setup so far is correct, open your browser and navigate to http://localhost:8888/Webucator/php/. You should get a listing like this:
  4. Click PHPBasics, then click Demos, and then hello-world.php. You should get a page that looks like this:

Setting the MySQL Password

The PHP files use 'pwdpwd' for the MySQL root password, while the default password used in MAMP is 'root'. In your browser, navigate to http://localhost:8888/phpMyAdmin/.

Note: It is important to do these steps in the order specified.

  1. Click the mysql database on the left.
  2. Click the SQL tab at the top.
  3. Enter the following in the textbox under Run SQL query/queries on database mysql:
  4. Click Go.
  5. You also need to update the password in C:MAMPbinphpMyAdminconfig.inc.php. Open the file in your editor (e.g., Visual Studio Code) and change the password setting as show below to 'pwdpwd'.

Installing the poetree Database

Use phpMyAdmin to install the poetree Gaming on parallels desktop. database used in class.

Apache Mamp
  1. Click on the Import tab heading
  2. Click the Choose File button.
  3. Browse to the poetree-db.sql file in your class files (C:MAMPWebucatorphppoetree-dbsql).
  4. Click Open:
  5. Click the Go button on the bottom left of the page.
  6. You should get a Success message and poetree should be added to your list of Databases.
Starting

One Final Test

Point your browser to http://localhost:8888/Webucator/php/Database/Solutions/phppoetry.com/. If you see a page like this, you're all set:

And that's it

Happy MAMPing!

Recommended Code Editor

Visual Studio Code (Download, Install, and Set up VS Code)

Mamp

While you may use a different editor or IDE, Visual Studio Code is an excellent IDE to learn to code on. It provides a nice balance of power and simplicity and it is available on Windows and Mac.

Stands for 'Mac OS X, Apache, MySQL, and PHP.' MAMP is a variation of the LAMP software package that can be installed on Mac OS X. It can be used to run a live web server from a Mac, but is most commonly used for web development and local testing purposes.

Apache (or 'Apache HTTP Server') is the component used to configure and run the web server. Once installed, Apache enables a Mac to host one or more websites. By configuring and running a local Apache web server, web developers can view their webpages in a web browser without publishing to an external server.

Templates

Mamp Apache Server Starts Then Stops

MAMP also includes MySQL and PHP. These two components are common (open source|open source) technologies used for creating dynamic websites. MySQL is a popular DBMS and PHP is a web scripting language. Webpages that include PHP code can access data from a MySQL database and load dynamic content on-the-fly. By installing PHP and MySQL locally, a developer can build and test a dynamic website on his Mac before publishing it on the Internet.

Apache Mamp Location

Apache, MySQL, and PHP are open source components that can be installed individually. However, it is faster and easier to install a pre-built 'AMP' package like MAMP or MAMP Pro. Both MAMP and MAMP Pro also include a graphical user interface GUI that can be used to manage the local web server.

NOTE: In some cases, the 'P' in MAMP may stand for Perl or Python, which are other scripting languages that can be used in place of PHP. The Windows version of LAMP is called WAMP.

Apache Server Does Not Start On Mamp

Updated: May 23, 2013