I am coming from a windows background and loved the simplicity and ease of use of WAMP when it came out. So I looked for the comparable package for my new Mac Pro. I had heard about MAMP so I jumped on that package.
I used this article from Sitepoint to get started: Build Your Own Database Drive Website Using PHP and MySql, Part I: Installation. If you are starting out, I highly recommend buying this book to get you up and running. I followed the directions to install MAMP. I was rather disappointed. I guess the comparable package to WAMP is MAMP Pro. I had the following problems:
- MySQL socket – even after I set the socket to the default of 3306, it kept reverting to 8889 after I stopped and started MAMP
- MySql startup was error prone and the logs spewed out warnings using the default mysql settings which have been noted on other sites(lower_case_table_names warning,Plugin ‘FEDERATED’ is Disabled,plugin ‘ndbcluster’ is disabled, can’t find a file ./mysql/plugin.frm’,etc)
- Missing ini files – my.cnf or my.ini,php.ini
- Tried to configure the system to start automatically on startup using plist files unsuccessfully, mainly because of mysql issues
So I bailed from using MAMP because it is not that hard to roll your own following the directions in the same article referenced above. MAMP Pro is an option(maybe that is the intent of the missing files and configuration issues) but having configured a windows LAMP I did not feel it was that hard to setup myself. As the article says, doing it yourself helps in your understanding of the LAMP configuration. Especially since apache 2.2.11 and php 5.3 are already included in Snow Leopard(but not configured). You really only have to install MySQL.
I followed the instructions in the above article and successfully installed LAMP on my machine.
I added the following to my httd.conf file which was not included in the instructions:
# DirectoryIndex index.html
DirectoryIndex index.html index.php
#m2p 1-13-2010, added mime-type for php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
which is NOT needed since if php5 is loaded i believe the following file is loaded which adds the same lines:
I found this script to be of help so I could toggle display of hidden files in FInder:
Toggle display of hidden files in Finder with keyboard shortcut
I realize the use of /private/etc works in the finder but I always had the same setting in windows. I always like to see my hidden files.
Also this site can be used to setup virtual hosts to access locations on harddrive other than default www site:
Virtual host on mac