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.

Can't call method "do" on an undefined value

Hi,

My server has: Ubuntu 16.04,  Apache/2.4.18, mod_perl/2.0.9, Perl/v5.22.1 and PHP 7.0 .

Whe i send inventory from a client, from localhost or any other client the server shows me this on the Error.log of apache:

[pid 1143] [client 127.0.0.1:58674] Can't call method "do" on an undefined value at /usr/local/share/perl/5.22.1/Apache/Ocsinventory/Server/System.pm line 177.\n

And the inventory info dont arrive to the server.

Thanks.

in OCS Inventory NG server for Unix by (120 points)

2 Answers

+1 vote

Your server is'nt configure correctly and cannot access to the database. You have to check z-ocsinventory-server.conf (ocsinventory-server.conf on Windows Server), exactly theses few lines

# Master Database settings
  # Replace localhost by hostname or ip of MySQL server for WRITE
  PerlSetEnv OCS_DB_HOST localhost
  # Replace 3306 by port where running MySQL server, generally 3306
  PerlSetEnv OCS_DB_PORT 3306
  # Name of database
  PerlSetEnv OCS_DB_NAME ocsweb
  PerlSetEnv OCS_DB_LOCAL ocsweb
  # User allowed to connect to database
  PerlSetEnv OCS_DB_USER ocs
  # Password for user
  PerlSetVar OCS_DB_PWD ocs

Modify OCS_DB_USER and OCS_DB_PWD with your own account, restart apache, and finaly launch an inventory.

by (22k points)
Good, Im going to change that info and check again that if it works.

Thanks.
0 votes
C:\xampp\apache\conf\extra\server.config .in this file need to change sql password
by (140 points)
 
Powered by Question2Answer
...