problems with mysqli extension

problems with mysqli extension

am 05.02.2006 12:02:46 von Filippo Mesirca

Hello!
I've can't get php to communicate through mysql via the unix socket.
I've compiled apache-2.0.55, mysql-5.0.18 and php-5.1.2. I've configured
mysql to put the unix socket in the /var/run/mysql/mysql.sock file.

Among the compilation options that I passed to php, there are
"--with-mysqli=shared,/usr" and
"--with-mysql-sock=/var/run/mysql/mysql.sock".

I've started the mysql and httpd daemons.
To test the connection to mysql I've used the following php script:

[code]
$mysqli = new mysqli("localhost", "myuser", "mypass", "world");
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_errno());
exit();
}
printf("Host information: %s
", $mysqli->host_info);
$mysqli->close();
?>
[/code]

All I get is "Connect failed: can't connect to local MySQL server
through socket '/var/run/mysql/mysql.sock' (13)".... but the socket file
is there!!!!!

I'm in desperate need of help.
Thanks

Filippo

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php