Macにインストール
% sudo port install php5 +apache2 +pear
% sudo port install php5-mysql php5-mbstring
% cd /opt/local/etc/php5
% sudo cp php.ini-development php.ini
% sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
[activating module `php5' in /opt/local/apache2/conf/httpd.conf]
% sudo vi /opt/local/apache2/conf/httpd.conf
# mode_php5
Include conf/extras-conf/mod_php.conf
Timezoneを設定
/opt/local/etc/php5/php.ini
[Date]
date.timezone = Asia/Tokyo
MySQL設定
/opt/local/etc/php5/php.ini
[MySQL]
mysql.default_socket = /opt/local/var/run/mysql5/mysqld.sock
portsで入れたphpとmysqlそれぞれの見に行くsockの場所のdefaultが違う。