Friday, October 29, 2010

set up PHP and Apache on Snow Leopard

It took me quite some trouble to get imagick working on the snow leopard. 

First, I tried to install xampp and mamp, which are two easy ways to get PHP, apache, mysql up and running. I used to have no issue with xampp, but the snow leopard has problems with locally complied in xampp. So, I tried mamp as well, imagick simply does not work and kept getting me "cannot find Imagick class" error.

So, I had to try to use the PHP and apache that ships with snow leopard. I simply followed the instructions in this blog post and it worked out well for the most part.

The only problem I am having is with the userdir apache module. Using the userdir module, you can just drop web applications to /Users/<username>/Sites. But no matter how hard I tried, I just could not get this working and had to give up.

UPDATE: found this post saying the permission denied problem is related to the user permission of _www. Apache runs as _www under _www group that need to have access to /Users/<username>/Sites. I’ve added xr to everyone on that directory, not sure why it is still not working. If you want to give it a try you can do it. 

No comments:

Post a Comment