#1037473 ocsinventory-reports: No such file or directory in /usr/share/ocsinventory-reports/require/header.php on line 31

#1037473#5
Date:
2023-06-13 08:07:53 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

apt install ocsinventory-server
http://server/ocsreports/ shows nothing

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

vi /etc/php/8.2/apache2/php.ini
display_errors = On
systemctl restart apache2

   * What was the outcome of this action?

http://server/ocsreports/ shows:

Warning: require_once(/usr/share/ocsinventory-reports/vendor/autoload.php): Failed to open stream: No such file or directory in /usr/share/ocsinventory-reports/require/header.php on line 31

Fatal error: Uncaught Error: Failed opening required '/usr/share/ocsinventory-reports/vendor/autoload.php' (include_path='.:/usr/share/php') in /usr/share/ocsinventory-reports/require/header.php:31 Stack trace: #0 /usr/share/ocsinventory-reports/index.php(44): require() #1 {main} thrown in /usr/share/ocsinventory-reports/require/header.php on line 31

   * What outcome did you expect instead?

Start the application configuration
Files appear to be missing

#1037473#10
Date:
2023-07-19 18:02:09 UTC
From:
To:
Simply commented /usr/share/ocsinventory-reports/require/header.php:31 -
but this is the least of the problems with this package, because whoever
can install it and change 'display_errors' can also grep error.log
Worse is #1041489 :-(
You're lucky it's a fresh install and not an upgrade of a large install...