php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50595 Mysqlnd extension needs to read my.ini file for sanity
Submitted: 2009-12-28 19:53 UTC Modified: 2013-02-18 00:34 UTC
From: tallyce at gmail dot com Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.3.1 OS: Windows7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tallyce at gmail dot com
New email:
PHP Version: OS:

 

 [2009-12-28 19:53 UTC] tallyce at gmail dot com
Description:
------------
http://au2.php.net/manual/en/migration53.incompatible.php
states that the Mysqlnd driver doesn't read the my.ini file but 
instead that mysqli_options() should be used to tell PHP about 
settings.

Can I plead the developers to have a mysqlnd.inifile option or 
similar?

This latest change is very regressive: it means that, for instance, if 
your database files are stored in a non-standard location, e.g. a data 
rather than OS C: disk (as specified in my.ini), or any other 
performance-related setting, these all have to be manually added to 
script files, making them completely non-portable, or editing through 
third-party apps (making it time-consuming to upgrade).

If such an ini option were added, might it just be a case of just 
parsing the specified file and passing the found values into whatever 
interface mysqli_options is using?

Reproduce code:
---------------
n/a

Expected result:
----------------
n/a

Actual result:
--------------
n/a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-29 12:12 UTC] johannes@php.net
Which settings would you actually need to set for the client in my.cnf? - The server will read it's settings anyways.
 [2010-01-02 13:51 UTC] tallyce at gmail dot com
In my case, the data files are too big to fit on the C: driver, so 
placing them in the MySQL subdirectory (under program files) is not an 
option. So, the "datadir" setting in my.ini is set to be elsewhere. (In 
the end I used a Windows7 symlink as a workaround, but this feels like a 
rather unsatisfactory hack.)

I don't know which settings are still read by the MySQL server process, 
but this one at least is ignored by PHP.

Either way, it seems odd that one should go through the process of 
setting up and tuning a MySQL server and then have the key program that 
reads the data simply ignore the settings, following the release of PHP 
5.3.x.
 [2010-11-24 10:13 UTC] jani@php.net
-Package: Feature/Change Request +Package: MySQLi related
 [2010-12-20 14:29 UTC] andrey@php.net
-Status: Open +Status: Feedback
 [2010-12-20 14:29 UTC] andrey@php.net
Can you give us an example code which has problems because of the missing settings. The datadir option in my.ini is in the [mysqld] section and thus to be read by the server, not by the client. It might be used by some utilities that work directly with the data on disk, thus skipping the server.
I don't see how LOAD DATA LOCAL INFILE is affected, as the data is on the client side. LOAD DATA is in every way system specific because the MySQL installation specifics may vary.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC