problems with mysqli extension

From: Date: Sun, 05 Feb 2006 11:02:46 +0000
Subject: problems with mysqli extension
Groups: php.db 
Request: Send a blank email to php-db+get-41177@lists.php.net to get a copy of this message
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] <?php $mysqli = new mysqli("localhost", "myuser", "mypass", "world"); if (mysqli_connect_errno()) { printf("Connect failed: %s<br>", mysqli_connect_errno()); exit(); } printf("Host information: %s<br>", $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

« previous php.db (#41177) next »