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 2.9, Software Total display "0" issue

Dear Support,

We updated from 2.8 to 2.9, My Dashboard Software Total display "0",

Inventory--> All software:Software search function cannot detect the data.

Our Server information:

OS:Centos 7(CentOS Linux release 7.9.2009)

Database Server:MariaDB Server version 10.3.29

OCSReports Version:OCSNG_ UNIX_ SERVER-2.9+Agent-

Web Server:Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.19 mod_perl/2.0.11 Perl/v5.16.3

How to correct this problem?

Thanks & Best regards,
in OCS Inventory NG server for Unix by (320 points)
edited by

11 Answers

+6 votes
Best answer

Hi All,

in general statistics, the display update of the software count / list has changed since v2.9 of the server... Now, you have to :

Run the cron_all_software.php file in /usr/share/ocsinventory-reports/ocsreports/crontab/

or create a cron, for eg. :

0 23 * * * cd /usr/share/ocsinventory-reports/ocsreports/crontab/ && php cron_all_software.php

Kind regards,


by (32.6k points)
selected by
0 votes


I have same issue.

  • PHP Version :
  • Web Server :
  • Database Server :
  • Version OCSReports:
  • 8.0.5
  • Apache/2.4.41 (Ubuntu)
  • (Ubuntu) version 8.0.23-0ubuntu0.20.04.1
  • 2.9
by (260 points)
0 votes
The same on my fresh install 2.9 with insertion of data from Mysqldump from 2.6 version

I'm using: Debian Buster/MariaDB PHP7.3.27  Apache/2.4.38 (Debian)
by (2.9k points)
0 votes

not working still no data

  • PHP Version :
  • Web Server :
  • Database Server :
  • Version OCSReports:
  • 7.4.16
  • Apache/2.4.46 (Ubuntu)
  • Ubuntu 21.04 version 10.5.10-MariaDB-0ubuntu0.21.04.1
  • 2.9
by (140 points)
0 votes

I also had the same problem.

When calling the PHP script 'cron_all_software.php' (in '/usr/share/ocsinventory-reports/ocsreports/crontab/') I got an error:
'Uncaught Error: Call to undefined function mysqli_report() in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php:158'.

After a short search I found out that probably the package 'php-mysql' is missing.
I installed it with 'sudo install apt-get php-mysql' (Ubuntu).

After that the script works.

It still throws some warnings:
'PHP Warning: Undefined array key "DEBUG" in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 90'
'PHP Warning: Undefined array key "DEBUG" in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 105'

But I think this can be ignored.

The software counter works now again and I could enter the script as cron-job.
Maybe this will help someone else who has a similar problem.

Many greetings.
by (600 points)
0 votes

@anotheruser - right, it helped (debian 10). However, note that these alerts (because the command is in cron) generate email notifications for the www-data account and the /var/mail/www-data mailbox gets very large very quickly (I already have over 10GB!).

How to fix these PHP warnings?

'PHP Warning: Undefined array key "DEBUG" in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 90'

'PHP Warning: Undefined array key "DEBUG" in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 105'

by (880 points)
0 votes
When a cron job produce text, this text is 'send' to the user who run the job.

So, if you don't want any 'mail', you have to add something like '>/dev/null 2>&1' at the end of command.
by (19.6k points)
0 votes

My config : OCS 2.10 docker version + CVE_search docker  (in same stack/ same network)

4 hosts in inventory
running "php cron_cve.php"

Total display "0" issue

running "cron_all_software.php" same issue

is it possible ?
by (760 points)
edited by
0 votes
(Another reason to not use a docker version !)

It's easy to understand : the cron task need to run INSIDE docker ...
by (19.6k points)
0 votes
If you run ocs inside Docker you can call cron process via web:


It may help for docker installations
by (330 points)
Powered by Question2Answer