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

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

OCS Plugins not work (OCS Server 2.7)

Good Morning,

 Greetings to everyone in this community, I am writing to please help me to solve a problem with OCS Server 2.7. The problem is that it is not loading the plugins (extensions) in the OCS web part.

 I have installed them following this guide:

 https://wiki.ocsinventory-ng.org/10.Plugin-engine/Using-plugins-installer /

 But in debug mode it can be seen that it does not load the reading of the SQL table. It does not ("select") its corresponding table in order to obtain the data that corresponds to the computer.

 If I do a (“select”) inside the mysql, it is observed that the table has corresponding data.

 Attached screenshot of files, settings and errors.

 Thank you.
in OCS Inventory NG plugins by (280 points)
recategorized by

6 Answers

0 votes

I upload the images that were missing to load

by (280 points)
0 votes

I upload the images that were missing to load

by (280 points)
0 votes
Hi,

Any errors in apache error.log file ?

Regards

Frank
by (88.5k points)
0 votes

Attached content of today's log:

restart apache2 at 17:36 today. To check your startup.

[Thu Apr 23 00:07:56.937047 2020] [mpm_prefork:notice] [pid 15330] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_perl/2.0.10 Perl/v5.26.1 configured -- resuming normal operations

[Thu Apr 23 00:07:56.937065 2020] [core:notice] [pid 15330] AH00094: Command line: '/usr/sbin/apache2'

[Thu Apr 23 08:42:34.668862 2020] [php7:warn] [pid 16943] [client 139.47.65.118:11308] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 08:42:34.669051 2020] [php7:warn] [pid 16943] [client 139.47.65.118:11308] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 08:42:35.175406 2020] [php7:warn] [pid 16943] [client 139.47.65.118:11308] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 08:42:35.175586 2020] [php7:warn] [pid 16943] [client 139.47.65.118:11308] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 08:42:36.906474 2020] [php7:warn] [pid 16943] [client 139.47.65.118:11308] PHP Warning:  Illegal string offset 'IMG' in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_ipdiscover/ms_custom_info.php on line 193, referer: 

[Thu Apr 23 10:30:08.357450 2020] [php7:emerg] [pid 16943] [client 192.168.3.201:55569] PHP Parse error:  syntax error, unexpected ''Password expires'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /usr/share/ocsinventory-reports/ocsreports/extensions/Winusers/cd_winusers/cd_winusers.php on line 37, referer: 

[Thu Apr 23 11:02:39.051470 2020] [php7:warn] [pid 18315] [client 192.168.3.201:55836] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 11:02:39.051683 2020] [php7:warn] [pid 18315] [client 192.168.3.201:55836] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 11:02:39.469471 2020] [php7:warn] [pid 18315] [client 192.168.3.201:55836] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 11:02:39.469629 2020] [php7:warn] [pid 18315] [client 192.168.3.201:55836] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 11:02:44.555906 2020] [php7:warn] [pid 18315] [client 192.168.3.201:55836] PHP Warning:  Illegal string offset 'IMG' in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_ipdiscover/ms_custom_info.php on line 193, referer: 

[Thu Apr 23 13:10:15.159214 2020] [php7:warn] [pid 16943] [client 192.168.3.201:57195] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 13:10:15.159396 2020] [php7:warn] [pid 16943] [client 192.168.3.201:57195] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 13:10:15.567420 2020] [php7:warn] [pid 16943] [client 192.168.3.201:57195] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 13:10:15.567624 2020] [php7:warn] [pid 16943] [client 192.168.3.201:57195] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 13:10:23.131992 2020] [php7:warn] [pid 18226] [client 192.168.3.201:57196] PHP Warning:  Illegal string offset 'IMG' in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_ipdiscover/ms_custom_info.php on line 193, referer: 

[Thu Apr 23 16:36:46.689563 2020] [php7:warn] [pid 18315] [client 192.168.3.201:57326] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 16:36:46.689765 2020] [php7:warn] [pid 18315] [client 192.168.3.201:57326] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 16:36:47.147047 2020] [php7:warn] [pid 18315] [client 192.168.3.201:57326] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer: 

[Thu Apr 23 16:36:47.147215 2020] [php7:warn] [pid 18315] [client 192.168.3.201:57326] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_ipdiscover.php on line 262, referer:

[Thu Apr 23 16:36:49.548446 2020] [php7:warn] [pid 18315] [client 192.168.3.201:57326] PHP Warning:  Illegal string offset 'IMG' in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_ipdiscover/ms_custom_info.php on line 193, referer: 

[Thu Apr 23 16:44:01.582847 2020] [php7:emerg] [pid 18322] [client 192.168.3.201:57429] PHP Parse error:  syntax error, unexpected ''Password expires'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /usr/share/ocsinventory-reports/ocsreports/extensions/Winusers/cd_winusers/cd_winusers.php on line 37, referer: 

[Thu Apr 23 17:32:18.344591 2020] [mpm_prefork:notice] [pid 15330] AH00169: caught SIGTERM, shutting down

[Thu Apr 23 17:32:19.304256 2020] [ssl:warn] [pid 19931] AH01909: ocsinventory.eikondata.es:443:0 server certificate does NOT include an ID which matches the server name

[Thu Apr 23 17:32:19.959824 2020] [ssl:warn] [pid 19932] AH01909: ocsinventory.eikondata.es:443:0 server certificate does NOT include an ID which matches the server name

[Thu Apr 23 17:32:19.980163 2020] [mpm_prefork:notice] [pid 19932] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_perl/2.0.10 Perl/v5.26.1 configured -- resuming normal operations

[Thu Apr 23 17:32:19.980225 2020] [core:notice] [pid 19932] AH00094: Command line: '/usr/sbin/apache2'

[Thu Apr 23 17:34:18.002973 2020] [php7:warn] [pid 19939] [client 192.168.3.4:61548] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/search/Search.php on line 1043, referer: 

Thank you.

by (280 points)
0 votes

Hi,

For winusers plugins, install the latest version. This error has been corrected.

[Thu Apr 23 16:44:01.582847 2020] [php7:emerg] [pid 18322] [client 192.168.3.201:57429] PHP Parse error:  syntax error, unexpected ''Password expires'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /usr/share/ocsinventory-reports/ocsreports/extensions/Winusers/cd_winusers/cd_winusers.php on line 37, referer:

Regards

Frank

by (88.5k points)
0 votes

Good morning

thank you very much for responding,

I have proceeded to update the plugin "WinUser", but I have noticed that the version is still 2.0, not the 2.2. But the important thing is that data arrives at mysql as seen in the image.

I have seen the log again and no longer reports "WinUser" error:

 [Fri Apr 24 08:46:23.983589 2020] [mpm_prefork:notice] [pid 21996] AH00169: caught SIGTERM, shutting down

[Fri Apr 24 08:46:25.425944 2020] [mpm_prefork:notice] [pid 24990] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_perl/2.0.10 Perl/v5.26.1 configured -- resuming normal operations

[Fri Apr 24 08:46:25.426049 2020] [core:notice] [pid 24990] AH00094: Command line: '/usr/sbin/apache2'

[Fri Apr 24 10:11:14.414712 2020] [mpm_prefork:notice] [pid 24990] AH00169: caught SIGTERM, shutting down

[Fri Apr 24 10:11:15.944086 2020] [mpm_prefork:notice] [pid 25257] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_perl/2.0.10 Perl/v5.26.1 configured -- resuming normal operations

[Fri Apr 24 10:11:15.950275 2020] [core:notice] [pid 25257] AH00094: Command line: '/usr/sbin/apache2'

It seems more PHP problem with the ocs website, because none of the 10 plugins I have installed is able to search for data in the mysql, it does not execute any query to SQL.

I've seen that the plugins have a file, for example: cd_winusers.php

That PHP file has the query needed to call SQL. But the web page is not able to run any query for the plugins, for the other options that comes by default when installing the OCS, if it works. Call your corresponding query, with the folder:

/usr/share/ocsinventory-reports/ocsreports/plugins/computer_detail

And the configuration file:

/usr/share/ocsinventory-reports/ocsreports/config/computer/plugins.xml

It has each PHP for the computer section that is installed by default.

It is possible that the error is called PHP on the website for installed plugins.

Thanks,

Greetings.

by (280 points)
 
Powered by Question2Answer
...