views:

25

answers:

1

The error I'm getting is below.

Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory

I've tried setting the xampp php to be the php in my PATH, hoping that it's a configuration file, but I had no luck with that. I'm not really sure why else it would say no such file or directory. Does anyone have any ideas?

Update: I also looked into the php.ini file that's being called (as taken from php -i), and set the default socket to equal XAMPP's mysql.sock file, and still the same error.

A: 

That was fun. I had to add the following entry into the options array from MySQL.

'unix_socket' => '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock',

I found it by (this is ugly) going into the Zend/Db/Adapter/Pdo/Abstract.php and having it print_r the exception. From there, I found it was trying to connect to /tmp/mysql.sock (Anyone know why?)

Dan G
After more digging: it seems that phpunit (which I installed using PECL on OS X Snow Leopard) was using the OS X php, and not XAMPP's.
Dan G