php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69143 Config file content not reloaded during script execution
Submitted: 2015-02-28 07:35 UTC Modified: 2017-10-24 04:27 UTC
From: morgan dot nilsson at ateles dot se Assigned:
Status: Suspended Package: mysqlnd_ms (PECL)
PHP Version: 5.5.22 OS: Ubuntu 14.04
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: morgan dot nilsson at ateles dot se
New email:
PHP Version: OS:

 

 [2015-02-28 07:35 UTC] morgan dot nilsson at ateles dot se
Description:
------------
If the contents of the mysqlnd_ms.config_file is changed it does not seem to be reloaded in a running process (apache, cli).

From http://php.net/manual/en/mysqlnd-ms.plugin-ini-json.php:

"The PHP configuration directive mysqlnd_ms.config_file is used to set the plugins configuration file. Please note, that the PHP configuration directive may not be evaluated for every web request. Therefore, changing the plugins configuration file name or location may require a PHP restart. However, no restart is required to read changes if an already existing plugin configuration file is updated."

mysqlnd_ms.enable = 1
mysqlnd_ms.config_file = "/etc/mysqlnd_ms.json"

Content of /etc/mysqlnd_ms.json:

{
    "db": {
        "master": {
            "master_0": {
                "host": "db1",
                "port": "3306"
            }
        },
        "slave": [

        ]
    }
}


Test script:
---------------
$db = new PDO($dsn, $user, $pass);
sleep(10); # change content in /etc/mysqlnd_ms.json: db1 -> db2
$db = new PDO($dsn, $user, $pass);


Expected result:
----------------
Second connection should connect to db2.

Actual result:
--------------
Still connects to db1.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 04:28 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 04:28 UTC] kalle@php.net
I'm gonna suspend this report as the mysqlnd_ms had not a release since 2013 or active commit activity since then, if activity comes back to this package, it should be re-opened
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 17:01:30 2024 UTC