SlideShare a Scribd company logo
1 of 19
devLink 2014
Eric W. Greene
http://www.ericwgreene.com
Doing PHP, Perl, and Python development made easy with a
great tool called MAMP. This session will demonstrate how
to install and configure MAMP to speed up web development
using the LAMP stack on a Mac and Windows. Additionally,
the session will demonstrate how to use several different
IDEs with MAMP to perform debugging and testing.
Agenda
• What is MAMP?
• Installation
• Configuration & Status
Overview
• Web Configuration
• Dynamic DNS
Configuration
• Database Configuration
• Mail Configuration
• IDE Configuration
(IntelliJ Idea &
SublimeText 2)
• MAMP for Windows -
BETA
What is MAMP?
• MAMP = My Apache - MySQL - PHP
• A very easy to setup local server development
environment.
• Web - Apache
• Databases - MySQL & SQLite (plus tools)
• DNS - Dynamic DNS (several providers supported)
• Mail - Postfix
• Server-Side Languages - PHP (multiple versions), Perl & Python
• MAMP vs MAMP PRO - PRO offers more functionality
and configuration enhancements. We will be using PRO
for the demo.
• Alternative to MAMP: AMPPS -> http://www.ampps.com/
Configuration Overview
• Start/Stop
Button
• Help Button
• Save Button
• WebStart
Button
Status Overview
Once the web
server is started,
click ‘WebStart’
to see a status
overview in your
web browser.
Status Overview Details
• Display PHP Info
• Display MySQL Credentials
• MAMP Version
• APC Opcode Cache Status
• Link to phpMyAdmin to manage MySQL
• Link to phpLiteAdmin to manage SQLite
• And a helpful FAQ
Web Server Configuration
• General Tab - Configure default ports for HTTP, HTTPS and
MySQL. Specify the Apache/MySQL user account. Select startup
options and the Apache error log file location.
• Modules Tab - Review the list of Apache modules available and
enable/disable them.
• PHP Tab - Specify default version and whether to allow different
versions for different sites. Select caching module. Enable the
debugger. Setup logging level and where to log it to.
• Hosts Tab - Setup the various host configurations for Apache.
• SSL Tab - Configure SSL for individual hosts.
• Extras
Demo - Managing Hosts
• Configure LocalHost
• Add a New Host
• Configure Host Name with Hosts file.
• Enable SSL on the new Host
• Add a Second New Host
• Configure Host Name with Hosts file.
• View Web Site from Modern.IE Virtual Machine
(ip address, Windows Hosts file & DNS entry). If
the Internet connection is good, view local web
site from BrowserStack.
• Delete new Host
Dynamic DNS Server
• Only works if your computer/router has an
addressable IP on the public Internet or an IP
address within your local network which you can
access.
• If using a router, be sure to setup port forwarding to
point to the port of the host you want to make
accessible. I do not recommend placing your whole
PC in the DMZ. Port forwarding allows you to do
what you need while being as secure as possible.
• Several options are available: DNS-O-Matic, np-
ip.com, dyn.com and easydns.com.
Demo - Setup Dynamic DNS 1/2
• For the demo we will use DNS-O-Matic and NameCheap.com
• Configure NameCheap.com
• First, enable the Dynamic DNS service
• Second, add an A record to the DNS entries for the
Hostname you would like to updated such as ‘www’. Set
the TTL to 60 since this is dynamic we want requestors
to not cache the value for long periods of time
• Configure DNS-O-Matic
• Create an account or sign in
• Register the service by entering the host name,
password and domain name to update
Demo - Setup Dynamic DNS 2/2
• Configure MAMP
• Click on Dynamic DNS tab. Click on DNS-O-Matic.
• Enter DNS-O-Matic credentials.
• Select either Activate Dynamic DNS Service to either
Automatic or Permanent.
• Save Settings and Restart the Server.
Database Server
• Two options MySQL and SQLite. SQLite is kind of “hidden”
since there is no database server there is nothing to
configure.
• You can configure the port number, the root password,
whether not to allow remote access to MySQL and log file
location.
• For MySQL, it provides phpMyAdmin, Sequel Pro and
MySQL Workbench. Another good option not included is
Navicat ($).
• For SQLite, it provides phpLiteAdmin through the WebStart
status page. Another good option not included is Navicat ($).
Demo - Create Database
• Fire up phpMyAdmin.
• Create a database. Create a table and add a few
records.
• Write a PHP script to retrieve rows of data from the
database.
Mail Server
• Use it send emails from your application.
• Using a “Smart Host” it can send emails through a
third party provider so the domain name and IP
address of the email and the sending computer all
match up.
IDE Integration
• MAMP uses XDebug to debug PHP scripts.
• Any IDE which can debug using XDebug can debug PHP
scripts on MAMP.
• Several popular IDEs are Sublime Text 2, PhpStorm,
NetBeans & Eclipse.
• We will demo Sublime Text 2 and IntelliJ Idea (PhpStorm on
steroids).
• In Windows, Visual Studio with PHP Tools would be a great
option as well. (this is actually a really great tool)
• Sadly, Dreamweaver does not support debugging.
Demo - Debugging in an IDE
• Debugging in Sublime Text 2.
• Show the XDebug Package.
• Set a breakpoint, fire up the debugger.
• Look at variables, watches and the call stack.
• Debugging in IntelliJ Idea.
• Configure MAMP PHP web server in the IDE for debugging.
• Set a breakpoint, fire up the debugger.
• Look at variables, watches and the call stack.
Perl and Python
• Default cgi-bin folder: /Application/MAMP/cgi-bin
• For Python:
• Add a Python file with no extension.
• Make sure the Python file is executable.
• Launch in browser with: http://localhost:8888/cgi-bin/hellopython (no
extension).
• For Perl:
• Add Perl file with no extension.
• Make sure the Perl file is executable.
• Launch in browser with: http://localhost:8888/perl/helloperl (notice the ‘perl’
path and no extension).
Advanced Configuration
• Editing Config File Templates.
• Backing up and restoring.
• Verify, Repair, Update and Save MySQL Databases.
• Other Preferences.
MAMP for Windows (BETA)
• From their website:
What is MAMP for Windows?
The abbreviation "MAMP" in MAMP for
Windows stands for: My Apache, MySQL
and PHP. With just a few mouse clicks,
you can install Apache, PHP and MySQL
on your PC! MAMP for Windows installs a
local server environment in a matter of
seconds on your PC, be it a Notebook or
Desktop PC. MAMP for Windows comes
free of charge and is installed very easily:
You can install Apache, PHP and MySQL
without starting a script or having to
change any configuration files!

More Related Content

What's hot

Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
KMS Technology
 
Rise of the responsive single page application
Rise of the responsive single page applicationRise of the responsive single page application
Rise of the responsive single page application
Oren Shatken
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
Hugo Fonseca
 
Introduction to wordpress & theme implementation
Introduction to wordpress & theme implementationIntroduction to wordpress & theme implementation
Introduction to wordpress & theme implementation
www.netgains.org
 

What's hot (20)

Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
 
Using WordPress as a Headless CMS
Using WordPress as a Headless CMSUsing WordPress as a Headless CMS
Using WordPress as a Headless CMS
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails Deployment
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1
 
Web development using ASP.NET MVC
Web development using ASP.NET MVC Web development using ASP.NET MVC
Web development using ASP.NET MVC
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Single Page Application
Single Page ApplicationSingle Page Application
Single Page Application
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
The Power of a Video Library - WordCamp Raleigh
The  Power of a Video Library - WordCamp RaleighThe  Power of a Video Library - WordCamp Raleigh
The Power of a Video Library - WordCamp Raleigh
 
Working in harmony
Working in harmonyWorking in harmony
Working in harmony
 
Performance tuning of Websites
Performance tuning of WebsitesPerformance tuning of Websites
Performance tuning of Websites
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress Puzzle
 
Isomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPIsomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWP
 
Rise of the responsive single page application
Rise of the responsive single page applicationRise of the responsive single page application
Rise of the responsive single page application
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
Introduction to wordpress & theme implementation
Introduction to wordpress & theme implementationIntroduction to wordpress & theme implementation
Introduction to wordpress & theme implementation
 

Similar to Using MAMP for Web Development

LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
Luis Rodríguez Castromil
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
Sharon James
 

Similar to Using MAMP for Web Development (20)

WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
Setting up a local WordPress Environment
Setting up a local WordPress EnvironmentSetting up a local WordPress Environment
Setting up a local WordPress Environment
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
 
be the captain of your connections deployment
be the captain of your connections deploymentbe the captain of your connections deployment
be the captain of your connections deployment
 
Debugging IBM Connections for the Impatient Admin - Social Connections VII
Debugging IBM Connections for the Impatient Admin - Social Connections VIIDebugging IBM Connections for the Impatient Admin - Social Connections VII
Debugging IBM Connections for the Impatient Admin - Social Connections VII
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Connections install in 45 mins
Connections install in 45 minsConnections install in 45 mins
Connections install in 45 mins
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 

Recently uploaded

valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 

Recently uploaded (20)

Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 

Using MAMP for Web Development

  • 1. devLink 2014 Eric W. Greene http://www.ericwgreene.com Doing PHP, Perl, and Python development made easy with a great tool called MAMP. This session will demonstrate how to install and configure MAMP to speed up web development using the LAMP stack on a Mac and Windows. Additionally, the session will demonstrate how to use several different IDEs with MAMP to perform debugging and testing.
  • 2. Agenda • What is MAMP? • Installation • Configuration & Status Overview • Web Configuration • Dynamic DNS Configuration • Database Configuration • Mail Configuration • IDE Configuration (IntelliJ Idea & SublimeText 2) • MAMP for Windows - BETA
  • 3. What is MAMP? • MAMP = My Apache - MySQL - PHP • A very easy to setup local server development environment. • Web - Apache • Databases - MySQL & SQLite (plus tools) • DNS - Dynamic DNS (several providers supported) • Mail - Postfix • Server-Side Languages - PHP (multiple versions), Perl & Python • MAMP vs MAMP PRO - PRO offers more functionality and configuration enhancements. We will be using PRO for the demo. • Alternative to MAMP: AMPPS -> http://www.ampps.com/
  • 4. Configuration Overview • Start/Stop Button • Help Button • Save Button • WebStart Button
  • 5. Status Overview Once the web server is started, click ‘WebStart’ to see a status overview in your web browser.
  • 6. Status Overview Details • Display PHP Info • Display MySQL Credentials • MAMP Version • APC Opcode Cache Status • Link to phpMyAdmin to manage MySQL • Link to phpLiteAdmin to manage SQLite • And a helpful FAQ
  • 7. Web Server Configuration • General Tab - Configure default ports for HTTP, HTTPS and MySQL. Specify the Apache/MySQL user account. Select startup options and the Apache error log file location. • Modules Tab - Review the list of Apache modules available and enable/disable them. • PHP Tab - Specify default version and whether to allow different versions for different sites. Select caching module. Enable the debugger. Setup logging level and where to log it to. • Hosts Tab - Setup the various host configurations for Apache. • SSL Tab - Configure SSL for individual hosts. • Extras
  • 8. Demo - Managing Hosts • Configure LocalHost • Add a New Host • Configure Host Name with Hosts file. • Enable SSL on the new Host • Add a Second New Host • Configure Host Name with Hosts file. • View Web Site from Modern.IE Virtual Machine (ip address, Windows Hosts file & DNS entry). If the Internet connection is good, view local web site from BrowserStack. • Delete new Host
  • 9. Dynamic DNS Server • Only works if your computer/router has an addressable IP on the public Internet or an IP address within your local network which you can access. • If using a router, be sure to setup port forwarding to point to the port of the host you want to make accessible. I do not recommend placing your whole PC in the DMZ. Port forwarding allows you to do what you need while being as secure as possible. • Several options are available: DNS-O-Matic, np- ip.com, dyn.com and easydns.com.
  • 10. Demo - Setup Dynamic DNS 1/2 • For the demo we will use DNS-O-Matic and NameCheap.com • Configure NameCheap.com • First, enable the Dynamic DNS service • Second, add an A record to the DNS entries for the Hostname you would like to updated such as ‘www’. Set the TTL to 60 since this is dynamic we want requestors to not cache the value for long periods of time • Configure DNS-O-Matic • Create an account or sign in • Register the service by entering the host name, password and domain name to update
  • 11. Demo - Setup Dynamic DNS 2/2 • Configure MAMP • Click on Dynamic DNS tab. Click on DNS-O-Matic. • Enter DNS-O-Matic credentials. • Select either Activate Dynamic DNS Service to either Automatic or Permanent. • Save Settings and Restart the Server.
  • 12. Database Server • Two options MySQL and SQLite. SQLite is kind of “hidden” since there is no database server there is nothing to configure. • You can configure the port number, the root password, whether not to allow remote access to MySQL and log file location. • For MySQL, it provides phpMyAdmin, Sequel Pro and MySQL Workbench. Another good option not included is Navicat ($). • For SQLite, it provides phpLiteAdmin through the WebStart status page. Another good option not included is Navicat ($).
  • 13. Demo - Create Database • Fire up phpMyAdmin. • Create a database. Create a table and add a few records. • Write a PHP script to retrieve rows of data from the database.
  • 14. Mail Server • Use it send emails from your application. • Using a “Smart Host” it can send emails through a third party provider so the domain name and IP address of the email and the sending computer all match up.
  • 15. IDE Integration • MAMP uses XDebug to debug PHP scripts. • Any IDE which can debug using XDebug can debug PHP scripts on MAMP. • Several popular IDEs are Sublime Text 2, PhpStorm, NetBeans & Eclipse. • We will demo Sublime Text 2 and IntelliJ Idea (PhpStorm on steroids). • In Windows, Visual Studio with PHP Tools would be a great option as well. (this is actually a really great tool) • Sadly, Dreamweaver does not support debugging.
  • 16. Demo - Debugging in an IDE • Debugging in Sublime Text 2. • Show the XDebug Package. • Set a breakpoint, fire up the debugger. • Look at variables, watches and the call stack. • Debugging in IntelliJ Idea. • Configure MAMP PHP web server in the IDE for debugging. • Set a breakpoint, fire up the debugger. • Look at variables, watches and the call stack.
  • 17. Perl and Python • Default cgi-bin folder: /Application/MAMP/cgi-bin • For Python: • Add a Python file with no extension. • Make sure the Python file is executable. • Launch in browser with: http://localhost:8888/cgi-bin/hellopython (no extension). • For Perl: • Add Perl file with no extension. • Make sure the Perl file is executable. • Launch in browser with: http://localhost:8888/perl/helloperl (notice the ‘perl’ path and no extension).
  • 18. Advanced Configuration • Editing Config File Templates. • Backing up and restoring. • Verify, Repair, Update and Save MySQL Databases. • Other Preferences.
  • 19. MAMP for Windows (BETA) • From their website: What is MAMP for Windows? The abbreviation "MAMP" in MAMP for Windows stands for: My Apache, MySQL and PHP. With just a few mouse clicks, you can install Apache, PHP and MySQL on your PC! MAMP for Windows installs a local server environment in a matter of seconds on your PC, be it a Notebook or Desktop PC. MAMP for Windows comes free of charge and is installed very easily: You can install Apache, PHP and MySQL without starting a script or having to change any configuration files!