Oracle 5.0 Reference Manual page 2627

Table of Contents

Advertisement

Mysqlnd replication and load balancing plugin (mysqlnd_ms)
a PHP extension may not display error messages properly. In the worst case, no error is shown and a
connection attempt fails without an adequate error message. This problem has been cured in version
1.5.0.
Example 20.271. Common error message in case of configuration file issues (upto version 1.5.0)
<?php
$mysqli = new mysqli("myapp", "username", "password", "database");
?>
The above example will output:
Warning: mysqli::mysqli(): (mysqlnd_ms) (mysqlnd_ms) Failed to parse config file [s1.json]. Please, ver
Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service
Warning: mysqli::query(): Couldn't fetch mysqli in Command line code on line 1
Fatal error: Call to a member function fetch_assoc() on a non-object in Command line code on line 1
Since version 1.5.0 startup errors are additionally buffered and emitted when a connection attempt is
made. Use the configuration directive
to set the error type used
mysqlnd_ms.force_config_usage
to display buffered errors. By default an error of type
will be emitted.
E_WARNING
Example 20.272. Improved configuration file validation since 1.5.0
<?php
$mysqli = new mysqli("myapp", "username", "password", "database");
?>
The above example will output:
Warning: mysqli::mysqli(): (mysqlnd_ms) (mysqlnd_ms) Failed to parse config file [s1.json]. Please, ver
It can be useful to set
when debugging
mysqlnd_ms.force_config_usage = 1
potential configuration file errors. This will not only turn the type of buffered startup errors into
but also help detecting misspelled section names.
E_RECOVERABLE_ERROR
Example 20.273. Possibly more precise error due to
mysqlnd_ms.force_config_usage=1
mysqlnd_ms.force_config_usage=1
<?php
$mysqli = new mysqli("invalid_section", "username", "password", "database");
?>
The above example will output:
Warning: mysqli::mysqli(): (mysqlnd_ms) Exclusive usage of configuration enforced but did not find the
2607

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents