From: jost_boekemeier at yahoo dot de Operating system: Any PHP version: 5.2.5 PHP Bug Type: MySQL related Bug description: php_mysql.c password handling incorrect
Description: ------------ The following code from php_mysql.c trashes the default_password, obtained from the php.ini file. passwd = MySG(default_password); ... case 3: { convert_to_string_ex(z_user); convert_to_string_ex(z_passwd); user = Z_STRVAL_PP(z_user); passwd = Z_STRVAL_PP(z_passwd); } Reproduce code: --------------- Set the mysql default password in the php.ini file and call mysql connect as follows: mysql(foo, bar, null, TRUE); Expected result: ---------------- passwd should not be set if argument is null. Actual result: -------------- Empty password is send to mysql. -- Edit bug report at http://bugs.php.net/?id=43635&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43635&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43635&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43635&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43635&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43635&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43635&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43635&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43635&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43635&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43635&r=support Expected behavior: http://bugs.php.net/fix.php?id=43635&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43635&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43635&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43635&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43635&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43635&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43635&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43635&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43635&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43635&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43635&r=mysqlcfg