MAMP Setup

From StutsmanSoft Developer Wiki

Revision as of 06:49, 29 December 2009 by 173.172.45.220 (Talk)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Setting up MAMP on Snow Leopard

Apache

This part is simple, just go to System Preferences, Sharing, and turn on Web Sharing.

Your web pages will be served from two locations:

http://localhost points to /Library/Documents/WebServer/Documents.

http://localhost/~username points to ~/username/Sites.

Use one or both locations to suit you.

PHP

PHP is easily installed by editing /etc/apache2/httpd.conf and uncommenting this line:

LoadModule php5_module libexec/apache2/libphp5.so

Then restart apache (sudo apachectl restart.)

NOTE: If you get time zone warnings, you need to make an edit to php.ini:

cd /private/etc sudo cp php.ini.default php.ini

Then, using your favorite editor, locate date.timezone and uncomment it, editing as follows:

date.timezone = America/Chicago

Then restart apache (sudo apachectl restart.)

MySQL

Just install the 64-bit binary from here: [1]

You will need to edit php.ini once more to correct 3 instances of mysql.sock:

pdo_mysql.default_socket=/tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock