In z-ocsinventory-server.conf file set OCS_OPT_DBI_PRINT_ERROR to 1 and restart apache. With this option database messages will be logged in apache error log file.
Another information : the URL you set in each agent has to be http://@ip_or_fqdn:port_if_different_of_80/ocsinventory and not http://@ip_or_fqdn:port_if_different_of_80/ocsreports
I have the same.
Code apache 200 = OK
Code apache 301 = moved permanently...
If you test with a linux agent, you will have this error 301:moved permanently.. I have this error and I don't know how to fix it.
If you find, thanks to share ;)