Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Use MysqL PDO instead of SQLi

Hi Guys,

2 things I noticed using OCSNG on ubuntu.

My install was working but then I saw errors in Apache. Enabling PHP errors I can see the following on the page:

Warning: mysqli_connect(): Headers and client library minor version mismatch. Headers:50554 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160

1. This would not be an issue if PDO is being used instead. Is PDO not the replacement and improvement?

2. The error I got when I uninstalled mysqli_connect also complained that the install.php is missing where as in fact MySQL was not correctly configured for the code used by OCS_NG.

if ((!is_readable(CONF_MYSQL)) || (!function_exists('session_start')) || (!function_exists('mysqli_connect'))) {
    require('install.php');
    die();
} else {
    require_once(CONF_MYSQL);

Will it not be better to improve OCS_NG to use MySQL PDO instead and if mysqli_connect is not available to rather complain about that than a missing install.php file? 

Regards,

Danie

in OCS Inventory NG server for Unix by (1.9k points)
edited by

Please log in or register to answer this question.

 
Powered by Question2Answer
...