note 49220 deleted from function.mysql-connect by betz

From: Date: Sun, 02 Oct 2005 17:47:05 +0000
Subject: note 49220 deleted from function.mysql-connect by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96202@lists.php.net to get a copy of this message
Note Submitter: ---- Debian (and "flavors" of Debain such as Ubuntu Linux) installations of mysqld place the socket file on a directory OTHER than /tmp/mysql.sock causing php connection problems. A quick workaround, as described in the docs above, is to specify ":/path/to/socket in the server parameter in db_connect. Here is an example where mysql socket is located at /var/run/mysqld/mysqld.sock: function open_connection() { $host = "localhost:/var/run/mysqld/mysqld.sock"; $user = "root"; $passwd = NULL; $db_name = "ipd"; return db_connect($host, $user, $password, $db_name); }

« previous php.notes (#96202) next »