Environment: some version of Slackware, Apache 2.2.x, PHP 5.1.5, MySQL
The issue: I'm using Zend Framework Zend_Db component (which uses PDO).
We have 2 mysql socket related settings in php.ini:
mysql.default_socket = /var/run/mysql/mysql.sock
mysqli.default_socket = /var/run/mysql/mysql.sock
On MySQL command prompt, query "SHOW VARIABLES LIKE '%socket%';"
returns the variable "socket" with correct (desired) value
But still, the output of phpinfo() contains the following lines in
mysql and mysqli sections, respectively:
What's worse though is that PDO seems to be using the wrong
"/tmp/mysql.sock" socket and every once in a while the sites
mysteriously stop working and throw the following exception:
SQLSTATE[HY000]  Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2)
I need a solution how to force PHP/MySQL/PDO (whatever causes this) to
use the specified socket (and stop throwing exceptions). I know that
there is a "unix_socket" option I can use in PDO connection string, but
since I don't directly use PDO but use Zend_Db instead, this is not
possible. I just need PDO to KNOW. (I don't know if the wrong
MYSQL_SOCKET and MYSQLI_SOCKET lines from phpinfo() affect this in any
Thank you very much.