Edit report at http://bugs.php.net/bug.php?id=47594&edit=1

 ID:                 47594
 Comment by:         john dot coll at csoft dot co dot uk
 Reported by:        jarrod dot makin at heartinternet dot co dot uk
 Summary:            'password' parameter in my.cnf not honored even with
                     mysqli_options()
 Status:             No Feedback
 Type:               Bug
 Package:            MySQLi related
 Operating System:   linux Centos 5.2
 PHP Version:        5.2.9
 Block user comment: N

 New Comment:

php 5.2.14

Linux lucian 2.6.9-89.29.1.EL #1 Tue Sep 28 09:26:45 EDT 2010 x86_64

exaclty the same problem


Previous Comments:
------------------------------------------------------------------------
[2009-03-18 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2009-03-10 22:29:01] jarrod dot makin at heartinternet dot co dot uk

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.

------------------------------------------------------------------------
[2009-03-10 10:26:27] j...@php.net

"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/bug.php?id=47594&edit=1

Reply via email to