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

#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/libphp5.so"
#And uncomment it (remove the #).



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

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

#Install 64 bit OS X MySQL
#http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.41-osx10.5-x86_64.dmg/from/pick?file=Downloads/MySQL-5.1/mysql-5.1.41-osx10.5-x86_64.dmg&mirror=pick

#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
#change
pdo_mysql.default_socket=/var/mysql/mysql.sock
mysql.default_socket = /var/mysql/mysql.sock
mysqli.default_socket = /var/mysql/mysql.sock

#to
pdo_mysql.default_socket=/tmp/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

http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging

<

div>

<

div id="highlighter_216794">

<

div>

Enter the “5.3” directory and find the file named “xdebug.so”. 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 xdebug.so 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 xdebug.so into that directory instead.
  <div>
  </div>

  <div>
    edit php.ini:
  </div>

  <div>
    <code>1.</code><code>[xdebug]</code>
  </div>

  <div>
    <code>2.</code><code>zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so</code>
  </div>

Tags: mysql, osx, php, unix, web