As soon as latest versions of Drupal 6 work supposedly fine with PHP 5.3 I decided to give it a try with OSX 10.6 bundled PHP version. Many would say it misses mcrypt, but I don't need it at the moment. Here are a few tips on how to make web development environment working on Snow Leopard. Actually it's probably complete walk trough for majority of cases.

Download and install official MySQL package: http://dev.mysql.com/downloads/mysql/. Then we need to change MySQL socket location as somehow OSX would use not so standard path. Most probably you'll receive "Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'" error in your PHP applications.

Just copy/paste the lines in your terminal:

sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

And don't forget to use brilliant Sequel Pro (http://www.sequelpro.com/) MySQL client.

You might want to change some settings in your php.ini. Let's create it first:
sudo mv /etc/php.ini.default /etc/php.ini

And then open to edit: sudo pico /etc/php.ini or if you have TextMate sudo mate /etc/php.ini

There are some reports on PHP app errors if there is no timezone set, so create one:

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/Berlin"

I'd also change post_max_size and upload_max_filesize to something higher, say 16M.

Now we need to up your Apache to allow local .htaccess to override default settings. Drupal and many other PHP apps would need it (sudo pico /etc/apache2/users/YOURUSER.conf). You have to change just one line:

   AllowOverride All

Don't forget to restart your Apache after all the changes made:

sudo apache graceful

That's it!

Add new comment
Comments
Still error

I followed your advice to the letter, but after I opened the php.ini & edited it (sudo pico /etc/php.ini), I get an error message. I've tried several times, but I just can't seem to get it right. Will try again though. Thx.

You know I'll necessarily use

You know I'll necessarily use your recomendations about this!