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

Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
galaxypingy
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 

Recently uploaded (20)

20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
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
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 

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!