Tag: php

MacPorts annoyance with PHP and MySQL

Posted by – October 27, 2009

I'm doing some local WordPress development, so I set up Apache, PHP, and MySQL using MacPorts. Apparently, the default setup does not set the location of the MySQL socket for you, so I copied /opt/local/etc/php5/php.ini-development to /opt/local/etc/php5/php.ini and changed these lines:

pdo_mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock
mysql.default_socket =/opt/local/var/run/mysql5/mysqld.sock
mysqli.default_socket =/opt/local/var/run/mysql5/mysqld.sock