#47594 [NEW]: 'password' parameter in my.cnf not honored even with mysqli_options()
From: jarrod dot makin at heartinternet dot co dot uk
Operating system: linux Centos 5.2
PHP version: 5.2.9
PHP Bug Type: MySQLi related
Bug description: 'password' parameter in my.cnf not honored even with mysqli_options()
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 bug report at http://bugs.php.net/?id=47594&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47594&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47594&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47594&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47594&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47594&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47594&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47594&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47594&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47594&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47594&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47594&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47594&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47594&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47594&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47594&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47594&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47594&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47594&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47594&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47594&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47594&r=mysqlcfg
Thread (4 messages)
- jarrod dot makin at heartinternet dot co dot uk