#49086 [Com]: MySQLI Options page does not list defaults
ID: 49086
Comment by: carsten_sttgt at gmx dot de
Reported By: jarrod dot makin at heartinternet dot co dot uk
Status: Open
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
| Does this mean that MySQLI will automatically try to read in a file
| called my.cnf that's in the same directory as the php script?
libmysql is reading the normal option files, like other mysql clients
e.g. the mysql command line tool. The search paths for option files are
defined during configure/compile of the mysql client lib (libmysql).
With MYSQLI_READ_DEFAULT_FILE you can specify another option file then
the default ones.
| Are there any special parameters that can be placed in the my.cnf
| to be used with MySQLI?
See the answer from Niel. libmysql is reading the groups [client] and
[mysql].
BTW:
This is only working, if the PHP extensions mysql, mysqli or pdo_mysql
are build with libmysql. It's not working if they are build with mysqlnd
(silent ignored).
Regards,
Carsten
Previous Comments:
------------------------------------------------------------------------
[2009-07-29 02:29:45] niel dot archer at blueyonder dot co dot uk
"Read options from named option file instead of my.cnf" is misleading.
As far as I can tell, the extension does not load my.cnf (or my.ini on
Windows) from any of the locations mentioned in the MySQL
documentation.
The options file is documented in the MySQL documentation
http://dev.mysql.com/doc/refman/5.0/en/option-files.html
The defaults appear to be:
MYSQLI_OPT_LOCAL_INFILE false
MYSQLI_READ_DEFAULT_FILE ''.
MYSQLI_READ_DEFAULT_GROUP 'client'.
------------------------------------------------------------------------
[2009-07-28 08:18:49] jarrod dot makin at heartinternet dot co dot uk
Description:
------------
The MySQLI options manual page lists various parameters:
MYSQLI_OPT_CONNECT_TIMEOUT connection timeout in seconds
MYSQLI_OPT_LOCAL_INFILE enable/disable use of LOAD LOCAL INFILE
but doesn't state what the defaults are if you don't explicitly set
them.
MYSQLI_READ_DEFAULT_FILE Read options from named option file instead
of my.cnf
"Read options from named option file instead of my.cnf" is misleading
to me. Does this mean that MySQLI will automatically try to read in a
file called my.cnf that's in the same directory as the php script?
Are there any special parameters that can be placed in the my.cnf to be
used with MySQLI? There are very few examples of this functionality
being used.
Reproduce code:
---------------
---
From manual page: mysqli.options
---
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49086&edit=1
Thread (6 messages)