make sure you ocsweb database is still there and running
make sure you have user 'ocs'@'localhost' (or your ocs serveur hostname), and that he has all privileges on ocsweb, if necessary grant him all the privilieges again
in /usr/share/ocsinventory-reports/ocsreports/ edit dbconfig.inc.php
make sure the user/password is correct and the database host too :
define("DB_NAME", "ocsweb");
define("SERVER_READ","localhost");
define("SERVER_WRITE","localhost");
define("COMPTE_BASE","user");
define("PSWD_BASE","password");
in /etc/apache2/con.d edit z-ocsinventory-server.conf
again, make sure everything is in order :
# User allowed to connect to database
PerlSetEnv OCS_DB_USER user
# Password for user
PerlSetVar OCS_DB_PWD password
restart mysql service, apache, if its still not working, it should tho):
backup or drop ocsweb if you're okay with rebuilding it (google how to backup mysql db),
activate install.php on ocs server (you're supposed to have deleted it so just put it back there : /usr/share/ocsinventory-reports/ocreports/).
go to http://YourServerIpOrHostname/ocsreports/install.php and fill the forms with correct mysql informations, the server should find the existing db or rebuild it