Doc #68923 [NEW]: Missed possible option at mysqli::options

From: Date: Tue, 27 Jan 2015 19:04:16 +0000
Subject: Doc #68923 [NEW]: Missed possible option at mysqli::options
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11889@lists.php.net to get a copy of this message
From: sveta at microbecal dot com Operating system: any PHP version: 5.5.21 Package: MySQL related Bug Type: Documentation Problem Bug description:Missed possible option at mysqli::options Description: ------------ It is possible to set character set for PHP script before mysqli_connect, but http://php.net/manual/en/mysqli.options.php does not say anything about it. It lists, instead, MYSQLI_READ_DEFAULT_FILE and MYSQLI_READ_DEFAULT_GROUP which have no effect if mysqlnd used. Originally reported at http://bugs.mysql.com/bug.php?id=75466 Test script: --------------- $ php -m | grep mysql mysql mysqli mysqlnd pdo_mysql $ php -r '$m=mysqli_init(); $m->options(MYSQLI_READ_DEFAULT_FILE, "/Users/sveta/.my.cnf"); $m->options(MYSQLI_READ_DEFAULT_GROUP, "client"); $m->connect("127.0.0.1","root","f"); ' Warning: mysqli::connect(): (HY000/1045): \0414\043E\0441\0442\0443\043F \0437\0430\043A\0440\044B\0442 \0434\043B\044F \043F\043E\043B\044C\0437\043E\0432\0430\0442\0435\043B\044F 'root'@'localhost' (\0431\044B\043B \0438\0441\043F\043E\043B\044C\0437\043E\0432\0430\043D \043F\0430\0440\043E\043B\044C: \0414\0410) in Command line code on line 1 $ php -r '$m=mysqli_init(); $m->options(MYSQLI_SET_CHARSET_NAME, "utf8"); $m->connect("127.0.0.1","root","f");' Warning: mysqli::connect(): (HY000/1045): Доступ закрыт для пользователя 'root'@'localhost' (был использован пароль: ДА) in Command line code on line 1 Svetas-MacBook-Pro:mysql-git sveta$ php -r '$m=mysqli_init(); $m->connect("127.0.0.1","root","f");' Expected result: ---------------- I expect either full list of options which can be specified for mysqli::options or link to MySQL documentation with full list. But in latter case all options which are not supported by PHP extension should be noted at http://php.net/manual/en/mysqli.options.php Actual result: -------------- See "test script" part. -- Edit bug report at https://bugs.php.net/bug.php?id=68923&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68923&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68923&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68923&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68923&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68923&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68923&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68923&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68923&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68923&r=support Expected behavior: https://bugs.php.net/fix.php?id=68923&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68923&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68923&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68923&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68923&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68923&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68923&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68923&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68923&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68923&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68923&r=mysqlcfg

« previous php.doc.bugs (#11889) next »