#50384 [Opn->Csd]: PDO::MYSQL_ATTR_READ_DEFAULT_FILE and DEFAULT_GROUP are missing from mysqlnd

From: Date: Wed, 23 Dec 2009 16:47:19 +0000
Subject: #50384 [Opn->Csd]: PDO::MYSQL_ATTR_READ_DEFAULT_FILE and DEFAULT_GROUP are missing from mysqlnd
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3543@lists.php.net to get a copy of this message
ID: 50384 Updated by: kalle@php.net Reported By: marques at displague dot com -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: 5.3.1 -Assigned To: +Assigned To: kalle New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Since the only way to obtain this kind of functionality in PDO_mysql would be to use these constants, then you should find an alternative method and check if the constants is defined. Previous Comments: ------------------------------------------------------------------------ [2009-12-23 16:47:13] svn@php.net Automatic comment from SVN on behalf of kalle Revision: http://svn.php.net/viewvc/?view=revision&revision=292551 Log: Fixed bug #50384 (PDO::MYSQL_ATTR_READ_DEFAULT_FILE and DEFAULT_GROUP are missing from mysqlnd) ------------------------------------------------------------------------ [2009-12-04 14:47:16] marques at displague dot com I just read this: http://www.php.net/manual/en/migration53.incompatible.php The new mysqlnd library does not read mysql configuration files (my.cnf/my.ini), as the older libmysql library does. If your code relies on settings in the configuration file, you can load it explicitly with the mysqli_options() function. Ugh. There is no mysqli_options equivalent for PDO_mysql. Should check that the class constant exists, and follow two different paths based on that? ------------------------------------------------------------------------ [2009-12-04 13:00:47] marques at displague dot com Description: ------------ PDO::MYSQL_ATTR_READ_DEFAULT_FILE and PDO::MYSQL_ATTR_READ_DEFAULT_GROUP are not defined in the mysqlnd version of the pdo_mysql module. Once defined, the functionality will need to be tested to see if it actually reads a mysql config file and uses the selected [group] for options. Reproduce code: --------------- echo PDO::MYSQL_ATTR_READ_DEFAULT_FILE . " " . PDO::MYSQL_ATTR_READ_DEFAULT_GROUP; Expected result: ---------------- 1003 1004 Actual result: -------------- PHP Fatal error: Undefined class constant 'MYSQL_ATTR_READ_DEFAULT_FILE' in Command line code on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50384&edit=1

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