Configuring Snow Leopard as a SLAMP box (Snow Leopard Apache MySQL PHP)

22nd Dec, 2009 | mysql osx php unix web

#Installing SLAMP from scratch (Snow Leopard Apache MySQL PHP)
#Start apache
System Preferences/Sharing/Web sharing

#Enable PHP in apache config
vi /etc/apache2/httpd.conf

#Find the line (in vi type /php)
#LoadModule php5_module libexec/apache2/"
#And uncomment it (remove the #).

#Configure php timezone in php config
cp /etc/php.ini.default /etc/php.ini
date.timezone = Europe/London

#Page scrolling: Control-D or Control-U for half a page down/up respectively. Nice.

#Install 64 bit OS X MySQL

#Note use the dmg version

#Install everything in the package in this order: mysql, the startup item, the preference pane.

#Install MySQL syspref pane and startup item package

#Configure PHP
mysql.default_socket = /var/mysql/mysql.sock
mysqli.default_socket = /var/mysql/mysql.sock

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

#update shell path for mysql
vi ~/.profile

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

#enable mod_rewrite
vi /private/etc/apache2/users/rick.conf

Options Indexes MultiViews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all

#Install phpMyAdmin
Set config to 'config', port 3306, socket = /tmp/mysql.sock

install xdebug




div id="highlighter_216794">



Enter the “5.3” directory and find the file named “”. You need to move this file to the<code>/usr/lib/php/extensions/no-debug-non-zts-20090626 directory. First, open a new Finder window and press Cmd + Shift + G. Enter /usr/lib/php/extensions/no-debug-non-zts-20090626/ into the prompt that appears and press “Go”. This will open the destination directory in the Finder window. Drag into the destination directory. You may be prompted for your administrator password. If the /usr/lib/php/extensions/no-debug-non-zts-20090626/ directory does not exist, locate the /usr/lib/php/extensions/ directory instead. This directory will contain a directory named something similar to no-debug-non-zts-20090626. Place into that directory instead.

    edit php.ini: