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.6 available

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

OCS version 2.7 update problem: mysql ssl enable? [closed]

Hi,

I've update from 2.5 to 2.7, backuped up config files, restored them and according to the server log, it's working, clients are posting.

The problem is in the admin console, ocsreports, it won't load, and the apache error log gives me this:

[Wed Apr 15 17:20:06.236045 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SSL_KEY - assumed 'SSL_KEY' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.254835 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SSL_CERT - assumed 'SSL_CERT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.254876 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant CA_CERT - assumed 'CA_CERT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.254897 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SERVER_PORT - assumed 'SERVER_PORT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.254922 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 156, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.256132 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SSL_KEY - assumed 'SSL_KEY' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 98, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.256184 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SSL_CERT - assumed 'SSL_CERT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 98, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.256207 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant CA_CERT - assumed 'CA_CERT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 98, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.256229 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SERVER_PORT - assumed 'SERVER_PORT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 98, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.256253 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 156, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.257769 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 31, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.257861 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SERVER_PORT - assumed 'SERVER_PORT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 45, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.257897 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_real_connect() expects parameter 6 to be int, string given in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 45, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.257937 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, null given in /usr/share/ocsinventory-reports/ocsreports/backend/identity/methode/local.php on line 36, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.258021 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_query() expects parameter 1 to be mysqli, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 104, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.258124 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result, null given in /usr/share/ocsinventory-reports/ocsreports/backend/identity/methode/local.php on line 42, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259650 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 31, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259714 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  Use of undefined constant SERVER_PORT - assumed 'SERVER_PORT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 45, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259746 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_real_connect() expects parameter 6 to be int, string given in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 45, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259781 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, null given in /usr/share/ocsinventory-reports/ocsreports/backend/ipdiscover/methode/local.php on line 28, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259820 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_query() expects parameter 1 to be mysqli, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 104, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259849 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result, null given in /usr/share/ocsinventory-reports/ocsreports/backend/ipdiscover/methode/local.php on line 32, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259881 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_query() expects parameter 1 to be mysqli, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 104, referer: http://192.168.0.5/

[Wed Apr 15 17:20:06.259939 2020] [php7:warn] [pid 5526] [client 10.100.60.5:2458] PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, null given in /usr/share/ocsinventory-reports/ocsreports/backend/ipdiscover/methode/local.php on line 45, referer: http://192.168.0.5/

The mysql server doeasn't have ssl enable. Is there an option in OCS to enable/disable encripted connections to the database?

any help would be appreciated,
thanks in advance.
closed with the note: Problem solved
in Administrative console by (160 points)
closed by

1 Answer

0 votes

I've managed to fix it!

the problem was that the old dbconfig.inc.php didn't have new variables needed for v2.7, and i restored the previous from v2.5, already configured, after the update.

define("SSL_KEY","");

define("SSL_CERT","");

define("CA_CERT","");

define("SERVER_PORT","3306");

define("ENABLE_SSL","0");

by (160 points)
 
Powered by Question2Answer
...