MAMP PRO 3 - User Guide ! ! ! March 2014 (c) appsolute GmbH! 1
I. What is MAMP PRO?! 3! II. Installation! 3! 1. Installation requirements! 3! 2. Installing and upgrading MAMP PRO! 3! 3. Uninstall! 4! III. First Steps! 4! Main GUI Elements! 5! 2. Meaning of Icons! 6! IV. Host and Server Settings! 6! 1. General! 6! 2. Hosts! 7! 3. Modules (Apache)! 17! 4. PHP! 18! 5. MySQL! 19! 6. Dynamic DNS! 20! 7. Postfix! 22! V. Menu! 22! 1. MAMP PRO! 22! 2. File! 24! 3. Log! 25! 4. Tools! 25! VI. FAQ! 25! VII. Troubleshooting! 27! VIII.
I. What is MAMP PRO?! ! MAMP PRO is a configuration application that helps you set up and run the Apache web server and the MySQL database server. It also takes care of the configuration of different versions of PHP. It is the big brother of the free MAMP application. Both applications need the MAMP folder to run.! ! Note: MAMP PRO stores its databases in a different location than MAMP the application.! ! II. Installation! ! 1.
3. Uninstall!
Use the MAMP PRO Uninstaller located in /Applications/MAMP PRO to remove MAMP ! PRO.! ! Drag the /Applications/MAMP folder to the Trash to complete uninstallation.! ! III. First Steps ! ! When the MAMP PRO application is launched for the first time helper tools will be installed. You will be prompted to enter your password.
Click on the Start button in the title bar to launch Apache and MySQL. In the status display, the launch status of the server is displayed. The web server uses port 8888 by default. This port must be specified when calling the local web page in the browser, e.g.: http:// localhost:8888!! ! Your default host for MAMP PRO is localhost. The files for localhost are located in the / Applications/MAMP/htdocs folder. See the Hosts section for more information on what a host is and how to create additional hosts.
2. Meaning of Icons! ! ! Change the file location, including the location of the document root, or log file.! Open email client.! ! Modify the access rights of the document root.! ! Open up Finder disk location.! ! More information provided, including PHPInfo().! ! ! This field must be filled in to proceed.! IV. Host and Server Settings! ! 1. General! ! Ports! Server programs, when addressed via the network, need to be assigned to a certain network port.
Start Apache and MySQL at system start! Apache and MySQL are started during startup of the OS, this means that the services are available before a user has logged into the system.! ! Start Apache and MySQL at startup of MAMP PRO! The services will start automatically at startup of MAMP PRO.! ! Stop Apache and MySQL at shutdown of MAMP PRO! The services will be stopped automatically when MAMP PRO shuts down.
Server name! The Server Name and Port number in combination must be unique within MAMP PRO. The host name may only contain letters and/or numbers, as well as dashes ("-"); but it may not begin or end with a "-" character. Names are not case-sensitive (upper and lower-case letters are not distinguished.)! ! If the servers are running you can use the Right Arrow button to open a host in your web browser.
Sounds complicated? Let’s take a look at an example: The Standard version is set to 5.5.9. You have oneHost set to PHP version “Standard (5.5.9)” and anotherHost set to “5.5.9”. If you set the PHP version in the PHP section to 5.4.25, MAMP PRO will adapt the PHP version of oneHost to this version (it is set to always use the standard version). AnotherHost will not be changed.! ! ! ! The button will open up a webpage with information about the PHP version used, including all its extensions.
Alias Name! Aliases are additional names for your virtual host. The same constraints apply to these additional names as to the host itself. Add aliases with the plus-button. Access Rights for Document Root Directory! For Apache to be able to access the files inside the document root folder and serve them to a web browser it needs adequate rights. If you use the user www to start Apache, then this user must have the right to access the files inside the document root folder. Typically this is not the case.
! ! b) Extended (Host)" ! Extended options can be set for the selected virtual host in the table. These options are security relevant!! ! ! Options for directive! ! Indexes! Activates or deactivates "directory browsing". If there is no index.html, index.php, etc in the document root, the content of the folder is displayed when this option is enabled. Without this option, nothing will be displayed or an error message will appear.! ! Includes! Allows the use of Server Side Includes (SSI).
! Directory Index! Determine which file Apache should serve if no filename is given in a address. By default it is either index.html or index.php.! ! Server admin! The e-mail address Apache will send error messages to.! ! Additional parameters for ! Additional Parameters for ! These directives go directly to the httpd.conf file. ! ! Note: Watch out for typos, they will otherwise prevent Apache from starting up.
d) Extras (Host)" ! MAMP PRO allows you to easily add popular packages to your hosts which we call Extras. Extras will always be loaded from the appsolute servers if you have an Internet connection. Over time more Extras will become available.! ! ! ! Note: The availability of an Extra will be affected by your hosts PHP version, Internet connection, cached Extras and available disk space.To add an Extra, press the plus button on the lower left side of the ‘Extras’ panel.
! Note: Do not install over a previous installation of Wordpress! Files will be overwritten without warning! ! Database name:! Set the name of your database schema which will be added to your local database. After installation you can view this database for this instance of Wordpress using phpMyAdmin, Sequel Pro, or MySQLWorkbench. ! ! Username:! The Wordpress admin.! ! Note: You will need this username to login into your new of Wordpress blog, please write this down.
Joomla! Joomla installations can share a single MySQL database if you provide a unique table prefix during installation. To use an existing database enter the name of the database and a unique table prefix. To create a new database use a unique database name, table prefix must not be empty.! ! Table prefix:! Set the name of your database schema prefix. Joomla offers the ability to manage multiple websites using a single database schema.
webEdition! webEdition will always be installed in a folder called webedition inside the document root folder.! ! ! ! Table prefix:! Set the name of your database schema prefix. webEdition offers the ability to manage multiple websites using a single database schema.! Database name:! Set the name of your database schema which will be added to your local database. After installation you can view this database for this instance of webEdition using phpMyAdmin, Sequel Pro, or MySQLWorkbench.
3. Modules (Apache)! ! The Apache Web Server installed by MAMP PRO comes with many modules pre-installed.! ! Apache Modules! The web server modules can be activated or deactivated depending on your needs. Module Description provides information pertaining to features and functions of the selected module.! ! ! ! If you want to use the PHP scripting language you must activate the php_module, if you want to use Python you need mod_wsgi module, Perl needs perl_module.
4. PHP! ! PHP is a popular web scripting programming language. MAMP PRO installs several versions of the PHP script interpreter.! ! ! Default version! Choose which PHP version to use.! ! Mode! Choose whether to use identical PHP versions for all hosts [Module Mode] or on a host by host basis [CGI Mode]. In CGI Mode the PHP settings will be identical for all hosts – except for the PHP version. Navigate to the Hosts section to change the PHP version for each individual host.
! What to log! Determine which error types should be reported.! ! • Display startup errors: Log PHP errors that occur when Apache loads the PHP module. ! • All errors and warnings: All errors will be reported.! • Errors: Script errors that make the further execution of the current PHP script impossible.! • Warnings: General errors in the PHP environment.! • Notices: Possible problems, that do not concern PHP, but which could be a notice of an error in a script.
! Allow network access to MySQL! If the checkbox for Allow network access to MySQL is not checked, network access to the database is prohibited, even from programs installed locally.! ! Note: This is an advanced feature not need for local development.! ! Only from this Mac! Only programs installed on this Mac can access MySQL via network functions.! ! From other computers! MySQL will answer any network request, even from computers on the internet, depending on you network settings.
! ! Note: To use the Dynamic DNS functions, you will need to register with one of the supported providers. This is independent of MAMP PRO and is not a service provided by appsolute GmbH.! ! User name! Enter the user name that was given to you by the provider of the Dynamic DNS Service.! ! Password! Enter the password that was given to you by the provider of the Dynamic DNS Service.! ! Activate Dynamic DNS Service ! ! Never (don’t use Dynamic DNS Service)! Deactivate the "Dynamic DNS" service.
7. Postfix! ! Sometimes you may need to send an email with PHP. To do so you have to configure and start Postfix. An easy way getting Postfix to run is using the configuration tool built into MAMP PRO.! ! Set domain of outgoing e-mails to! If you want to use the PHP function mail() for sending emails to your own email address (like mail@johndoe.com) you just need to open MAMP PRO, go to Server -> Postfix and add the value "johndoe.
When left using the default setting (/MAMP/), you will be directed to the MAMP PRO utilities start page using the Alias definition /MAMP/. If this field is left blank, you will be taken to your default document root (http://localhost:8888 in the /Applications/MAMP/ htdocs). If you enter /subDirectory in this field, you will be taken to the /Applications/ MAMP/htdocs/subDirectory folder via your default web browser (http://localhost:8888/ subDirectory).
! 2. File! ! Edit Template
MAMP PRO uses templates to create the necessary server config files. You can edit these templates from the menu item File > Edit template. Here, you have access to options which are not accessible from the MAMP PRO user interface.! ! Note: Edition errors in the templates of the configuration files can cause the servers not to start. This could mean that you will have to reset the settings for MAMP PRO, and you may lose all your other custom settings.
Note: The backup feature makes a backup of your current host settings. It will not back up the files (.php, .html, .js etc…) in a hosts document root! ! ! Restore From Backup! Restore your host settings and MySQL database files.! ! 3. Log! ! The MAMP server record events like errors in so-called log files. Use the MAMP PRO menu to display the content of these files.! ! 4. Tools! ! Extras! Go directly to the Extras pane of the last selected host.
! Are updates free of charge?" Yes, all updates in the current major version (3.x) are free of charge. To update MAMP PRO from e.g. 3.1.2 to 3.9 just use the serial number you already have. Licenses are good forever, they are not on a subscription basis.! ! Can I use MAMP at the same time as MAMP PRO?" Both applications, MAMP as well as MAMP PRO, are configuration tools for the tools inside the folder MAMP. Though you could run them simultaneously you should not do it.
• ~/Library/Preferences/de.appsolute.mamppro.plist! ! MySQL! • /Library/Application Support/appsolute/MAMP PRO/db/mysql! ! Dynamic DNS! • /Library/LaunchDaemons/de.appsolute.mamp_dyndns.plist! • ~/Library/LaunchAgents/de.appsolute.mamp_dyndns.plist! ! Autostart at system start! • /Library/StartupItems/MAMP/MAMP! • /Library/StartupItems/MAMP/StartupParameters.
Your default Wordpress username and password when setup through MAMP PRO are admin/admin.! ! My Apache Server will not start?" The most common problem with Apache Server not starting is another Apache instance already running on the same port. To check this! ! - Quit MAMP PRO.! - Open the Activity Monitor located in your /Applications/Utilities folder.! - Type "httpd" into the search field on the top right.! - Quit every process you find after your search.! - Restart MAMP PRO.
2. Select File -> Edit Template -> PHP 5.x.x php.ini / PHP 5.x.x php.ini
! 3. Search this line "output_buffering = Off”! 4. Change "Off" to "On" or to a maximum number of bytes instead (for example "4096")! 5. Save the file! 6. Start Servers! ! ! Check the Default Storage Engine of MySQL! 1. Open MAMP! 2. Start the servers! 3. Open Terminal.app (/Applications/Utilities)! 4. Enter the following line into the terminal and hit Enter:!
cd /Applications/MAMP/Library/bin! ! ! ./mysql ! 5.
9. Enter the following line into the MySQL prompt and hit enter:
exit;! ! ! Increase the PHP memory limit! 1. Start MAMP PRO! 2. Stop the server if it's running! 3. Choose Menu -> File -> Edit Template -> PHP 5.x.x php.ini / PHP 5.x.x php.ini
! ! !
! ! ! ! ! ! ! ! ! ! ! 4. The PHP ini file will be opened.! 5. If a dialogue box pops up, read it and confirm with OK! 6. Search (Command-F) for "memory_limit" (without quotes)! 7.
8. Now you can change the default value of 32M. For instance into 64M or even more (like 128M)! 9. Save (Command-S) your changes.! 10. Close (Command-W) the file.! 11. Start the Server.! Set the MySQL Default Storage Engine! The MySQL server of MAMP PRO uses the Default Storage Engine MyISAM. If you want to change this, you have to change the configuration file of the MySQL server. With this tutorial we want to show you how to manage this. As Default Storage Engine we are using InnoDB.! ! 1.
9. Save (Apple + S) all changes made on "my.cnf"! 10. Close the editor window (Apple + W)! 11. Start the MAMP PRO servers.! ! ! Show the Postfix log file! With a text editor! ! Note: If you want to open the Postfix log file with a text editor, you have to make the file visible.! ! 1. Open the Terminal.app (Applications/Utilities)! 2. Enter the following and hit Enter
! !! defaults write com.apple.finder AppleShowAllFiles boolean true
! 3.
! tail -f /private/var/log/mail.log
! 3. You can now read the Postfix log file within the Terminal. The log file keeps updating ! as new entries apply.
! 4. Press "Ctrl + c" to stop the process! ! ! Using MySQL command line! To use the MySQL command line, perform the following steps:! ! 1. Start MAMP PRO! 2. Start the servers! 3. Open Terminal.app (Applications -> Utilities)! 4. Type in an hit enter.! ! cd /Applications/MAMP/Library/bin! ! 5. Type in and hit enter.! ! .
! ! $mysqli->close(); ?> 34