ID: 47594 Comment by: jarrod dot makin at heartinternet dot co dot uk Reported By: jarrod dot makin at heartinternet dot co dot uk Status: Feedback Bug Type: MySQLi related Operating System: linux Centos 5.2 PHP Version: 5.2.9 New Comment:
Good point. I should have detailed this in my message. The file is 600, readable to just the script owner (it is running through suexec). The username part is read in and understood, however the password part appears to be ignored. Previous Comments: ------------------------------------------------------------------------ [2009-03-10 10:26:27] [email protected] "On Unix platforms, MySQL ignores configuration files that are world-writable. This is intentional as a security measure." So check the permissions first. ------------------------------------------------------------------------ [2009-03-08 00:23:36] jarrod dot makin at heartinternet dot co dot uk Description: ------------ Just like http://bugs.php.net/bug.php?id=43812 OS: Centos 5.2 php: 5.2.8 msqli api: 5.1.30 mysql Ver 14.14 Distrib 5.1.30, for pc-linux-gnu (i686) using readline 5.1 Contents of my.cnf [client] user = web35-poker host = localhost password = password [mysql] database = web35-poker Reproduce code: --------------- $db = mysqli_init(); $db->options(MYSQLI_READ_DEFAULT_FILE,'/path/to/file.cnf'); $db->real_connect(); if ( mysqli_connect_errno() ) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } Expected result: ---------------- I expect $db to be a database handle Actual result: -------------- The following error message: Connect failed: Access denied for user 'web35-poker'@'localhost' (using password: NO) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47594&edit=1
