#43812 [Opn->Asn]: 'password' parameter in my.cnf not honored even with mysqli_options()
From: tony2001@php.net Date: Sat, 12 Jan 2008 15:28:16 +0000 Subject: #43812 [Opn->Asn]: 'password' parameter in my.cnf not honored even with mysqli_options() References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-121220@lists.php.net to get a copy of this message
ID: 43812 Updated by: tony2001@php.net Reported By: graced at wingsnw dot com -Status: Open +Status: Assigned Bug Type: MySQLi related Operating System: Debian lenny/sid PHP Version: 5.2.5 -Assigned To: +Assigned To: andrei Previous Comments: ------------------------------------------------------------------------ [2008-01-11 03:32:02] graced at wingsnw dot com Description: ------------ my.cnf files allow the username/password/hostname and other connection information to be stored for later use. The Mysqli extension accepts a username from the file (overriding the default of the current login username) but not a password, thus it attempts to connect with no password even when a password is specified. The mysql command line client, when pointed at the file using --defaults-extra-file=path/to/file.cnf, successfully connects. Reproduce code: --------------- my.cnf contents: [client] host = localhost user = "username" password = "topsecret" PHP script: <?php error_reporting(E_ALL); $DB = mysqli_init(); $DB->options(MYSQLI_READ_DEFAULT_FILE, "my.cnf"); $DB->options(MYSQLI_READ_DEFAULT_GROUP, "client"); $DB->real_connect(); Expected result: ---------------- A successful database connection. Actual result: -------------- Warning: mysqli::real_connect(): (28000/1045): Access denied for user 'wadmin'@'localhost' (using password: NO) in /home/.../- on line 6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43812&edit=1
Thread (25 messages)
- #43812 [Opn->Asn]: 'password' parameter in my.cnf not honored even with mysqli_options()
- #43812 [Asn]: 'password' parameter in my.cnf not honored even with mysqli_options()
- #43812 [Asn->Fbk]: 'password' parameter in my.cnf not honored even with mysqli_options()
- #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [NoF]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [NoF]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [NoF]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [NoF->Fbk]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Fbk->NoF]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [NoF->ReO]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [ReO->Fbk]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Com]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Fbk->NoF]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [NoF->Opn]: 'password' parameter in my.cnf not honored even with mysqli_options()
- Bug #43812 [Opn]: MYSQLI_READ_DEFAULT_FILE option ignored when using mysqlnd
| « previous | php.bugs (#121220) | next » |
|---|