Closed pchamo closed 2 years ago
Hi @pchamo ,
This function determines if there are software categories. Your error leads me to think that you are missing a column from the software_categories table.
Can you run this command on your mysql describe software_categories;
and return me the result ?
Best regards, Charlene
HI @charleneauger, below the result, thanks.
mysql> describe software_categories;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| ID | int(11) | NO | PRI | NULL | auto_increment |
| CATEGORY_NAME | varchar(255) | NO | | NULL | |
+---------------+--------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
Hi @pchamo ,
Can you run the next command in sql ?
ALTER TABLE `software_categories` ADD `OS` VARCHAR(255) default NULL;
It should fix the problem.
Best regards, Charlene Auger
That fixed my issue, but I also had to execute three lines more according to https://github.com/OCSInventory-NG/OCSInventory-ocsreports/blob/master/files/ocsbase_new.sql because new similar errors appeared:
ALTER TABLE software_category_exp
ADD SIGN_VERSION
VARCHAR(255) default NULL;
ALTER TABLE software_category_exp
ADD VERSION
VARCHAR(255) default NULL;
ALTER TABLE software_category_exp
ADD PUBLISHER
VARCHAR(255) default NULL;
I wonder if that is an ocs bug or something wrong that I did updating ocs.
Thank you very.
General informations
Operating system : CentOS 7.6.1810
Server informations
Perl version : perl-5.16.3-294 Database: mysql-community-server-5.7.35-1
OCS Inventory informations
Ocs server version : 2.9.1
Problem's description
Below lines are recorded again and again in /var/log/httpd/error_log with PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 1. get_category_software function shouldn't be run when no software categories are defined.