Thank you very much to all who responded, and especially Ryan for his patience. Once I got my httpd.conf in proper shape, php worked fine, but mysql didn't. The problem was: error: 'Can't connect to local MySQL server through socket '/opt/ local/var/run/mysql5/mysqld.sock' This was a problem others had wrestled with as well, I soon found out. It turned out I'd made two mistakes when installing mysql: I hadn't used the +server variant and I hadn't initialized the database. So I uninstalled php5 and mysql5, reinstalled mysql5 +server and followed the instructions in an old post by Ryan Schmidt on how install the main db: http://article.gmane.org/gmane.os.apple.macports.user/619/match=mysql I then reinstalled php5 +apache2 +mysql5 and now they're all nice to each other once again. Elise van Looij