Kev Chapman hat eine gute Dokumentation darüber, wie man Apache auf Mac OS X 10.6 verwendet auf seinem Blog. Setting up Apache on Snow Leopard hat sehr viele nützliche Tips und deshalb kopiere ich nur die (für mich) wichtigsten Teile hier her (als Erinnerungshilfe für mich), den Rest bitte bei Kev direkt lesen.
Problem: PHP kann nicht mit dem lokalen mySQL Server sprechen
Lösung: /etc/php.ini.default im Texteditor öffnen und die Zeile mit mysql.default_socket suchen (irgendwo bei Zeile #1213) und in folgendes ändern:
mysql.default_socket = /tmp/mysql.sock
Die Datei speichern und Apache neu starten.
Damit .htaccess im “Sites” Ordner im OS X User Ordner funktioniert, /etc/apache2/users/<username>.conf editieren:
<Directory "/Users/USERNAME/Sites/">
Options Indexes MultiViews FollowSymLinksAllow
Override All
Order allow,deny
Allow from all
</Directory>
Kev Chapman has a good documentation about how Setting up Apache on Snow Leopard. It’s worth a read and has all you may need to sucessfully setup apache on Mac OS X 10.6.x – therefore i copy only the most important parts here (as a reminder for me):
Problem: PHP can’t talk to the locally running mySQL server
Fix: edit /etc/php.ini.default and find the line containing mysql.default_socket (around line #1213) and change it to:
mysql.default_socket = /tmp/mysql.sock
Save this file and restart the server.
Getting .htaccess to work in your home directory’s Sites folder edit /etc/apache2/users/<username>.conf:
<Directory "/Users/USERNAME/Sites/">
Options Indexes MultiViews FollowSymLinksAllow
Override All
Order allow,deny
Allow from all
</Directory>