ID: 11863
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: MySQL related
Operating system: Unix
PHP Version: 4.0.6
Description: Cannot connect to mysql server

Yeah, the server is actually running as i can connect to it from console. The socket 
is set srwxrwxrwx so it is also ok i presume.
The exact same configuration used to work with php-4.0.5 :/

Previous Comments:

[2001-07-03 16:32:07] [EMAIL PROTECTED]

It works fine here. Are you sure MySQl is actually running, and are the permissions on 
the socket correct?



[2001-07-03 16:28:24] [EMAIL PROTECTED]

I am using php-4.0.6 with MySQL-3.23.39 and there seems to be a problem with 
connecting to the database server. Problem that didn't happen with any previous 
version (even php-4.0.5 that i was using till today). phpinfo() shows a correct 
configuration and correct path to the socket, mysql server works correctly from 
console and i'm not using the bundled libraries (tried them also and it gave the same 
error). This was reproductible under OpenBSD-2.7-stable, OpenBSD-2.8, 
OpenBSD-2.8-stable, OpenBSD-2.9, OpenBSD-2.9-stable, Linux Debian (current), Linux 
RedHat 7.0, Linux Slackware 7.1 and probably others.

Configuration flags of PHP are:

--with-apache=/usr/local/apache --with-mysql=/usr/local/mysqlc 
--with-openssl=/usr/local/ssl --with-gd=/usr/local/gd --with-jpeg-dir=/usr/local 
--with-png-dir=/usr/local --with-zlib-dir=/usr/local --with-ttf=/usr/local 
--enable-apc --enable-calendar --enable-bcmath --enable-track-vars

MySQL related configuration directives in php.ini are:

mysql.allow_persistent = Off
mysql.max_persistent = 0
mysql.max_links = 1000
mysql.default_port = 3306
mysql.default_socket = /usr/local/mysqlc/var/mysql.sock
mysql.default_host = localhost

MySQL was compiled with the following flags:

--enable-static --localstatedir=/usr/local/mysqlc/var --with-libwrap=/usr 
--with-mysqld-user=mysqlc --with-unix-socket-path=/usr/local/mysqlc/var/mysql.sock 
--with-tcp-port=3306 --without-bench --without-mit-threads

Error returned:

Warning: Can't connect to local MySQL server through socket 
'/usr/local/mysqlc/var/mysql.sock' (13) in /home/www/k/ on line 3

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/usr/local/mysqlc/var/mysql.sock' (13) in /home/www/k/ on line 3

Script that returned the error:

<? mysql_connect("localhost","joeuser","joepassword"); ?>

By the way, if someone would care to write a patch for:
I'd appreciate it cause i got poor C skills  ;p


Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to