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.

No Data received from Agents [closed]

Hullo together,

OCS possibly maybe a great tool, but... for me it doesn't work... And after a few days of research, there's no idea where it is stucked...

Apache? Runs and works well.
mysql? Runs and works well.
OCS - Server? Runs and works well.

Agents? Runs on Windows/Linux/Android... but Server doesn't receive any data, or the database, for what reason ever, doesn't collect and write it down... :(

Where else can I search for errors? Please give me a hint.

Here the collected data for U. So U can see there is no error or what ever blocked the data to write down into database...
 

  • PHP-Version : 7.3.11
    Webserver : Apache/2.4.38 (Debian)
    Datenbank-Server : Debian 10 version 10.3.22-MariaDB-0+deb10u1
    Version OCSReports: 2.6

  • BS-Name : Linux x86_64
  • Version : 4.19.0-8-amd64
  • Installierter Speicher : 16042 MB
  • Freier Speicher : 15192 MB
  • Prozessor : Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz
  • Distribution : Debian GNU/Linux 10 (buster)
  • root@debcmdb:~# uname -a

Linux debcmdb 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

<code>

root@debcmdb:~# uname -a
Linux debcmdb 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

root@debcmdb:~# netstat -tlnp
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      10839/mysqld
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      476/memcached
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      10706/apache2
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      674/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      674/sshd
tcp6       0      0 :::6556                 :::*                    LISTEN      1/init

root@debcmdb:~# curl localhost:3306
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.

root@debcmdb:~# tail -f /var/log/mysql/error.log
2020-02-14 12:55:08 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-02-14 12:55:08 0 [Note] InnoDB: 10.3.22 started; log sequence number 132703983; transaction id 241898
2020-02-14 12:55:08 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-02-14 12:55:08 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-02-14 12:55:08 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-02-14 12:55:08 0 [Note] Reading of all Master_info entries succeeded
2020-02-14 12:55:08 0 [Note] Added new Master_info '' to hash table
2020-02-14 12:55:08 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.22-MariaDB-0+deb10u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 10
2020-02-14 12:55:10 0 [Note] InnoDB: Buffer pool(s) load completed at 200214 12:55:10

cat /var/log/apache2/access.log | grep -i agent
172.17.1.166 - - [14/Feb/2020:12:33:26 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.0.58 - - [14/Feb/2020:12:33:35 +0100] "POST /ocsinventory HTTP/1.1" 200 12903 "-" "OCS-NG_unified_unix_agent_v2.4.2"
172.17.1.70 - - [14/Feb/2020:12:33:45 +0100] "POST /ocsinventory HTTP/1.1" 200 12903 "-" "OCS-NG_Android_agent_v2.3.1"

root@debcmdb:~# cat /var/log/apache2/error.log
[Fri Feb 14 12:38:49.061593 2020] [mpm_prefork:notice] [pid 11931] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 mod_perl/2.0.10 Perl/v5.28.1 configured -- resuming normal operations
[Fri Feb 14 12:38:49.061666 2020] [core:notice] [pid 11931] AH00094: Command line: '/usr/sbin/apache2'

AGENTS:

Linux-agent, running in same environment like the OCS server himself:

root@debcmdb:~# cat /etc/ocsinventory/ocsinventory-agent.cfg
server=http://localhost/ocsinventory
SSL=0

Windows-Agent (gave him credentials to check if that is the fault... it doesn't...):

ocsinvetory.ini:

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://172.17.0.58:80/ocsinventory
SSL=0
CaBundle=cacert.pem
AuthRequired=0
User=p7Nd9LFb+sEhPNvnnhEa9A==|||TISI7P//C6P8Jdu2v2l4qg==
Pwd=kVjNWMBhN2PN6hrE2QuzEw==|||QHYmXnxK4pRPkLWu1s9kdw==
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
PROLOG_FREQ=10
INVENTORY_ON_STARTUP=0
OLD_PROLOG_FREQ=10
TTO_WAIT=35580

OCSInventory.log (an example with full of datas):

==============================================================================

Starting OCS Inventory NG Agent on Friday, February 14, 2020 08:00:42.
AGENT => Running OCS Inventory NG Agent Version 2.6.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.6.0.0
AGENT => Loading plug-in(s)
DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files\OCS Inventory Agent\plugins>
DLL PLUGIN => 0 DLL Plug-in(s) successfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
COM PROVIDER => Loading Communication Provider <C:\Program Files\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.6.0.0>
AGENT => Sending Prolog
DID_CHECK => Read DeviceID <KEGLAP057-2020-01-30-09-30-16> and MACs <00:Ejhfdjhdhjdjhdjhd0:B6:A5:D3:84> in file <ocsinventory.dat>
COM SERVER => Initializing cURL library for sendRequest
COM SERVER => Using cURL without server authentication
COM SERVER => Disabling cURL proxy support
COM SERVER => Disabling cURL SSL server validation support
COM SERVER => Sending HTTP Post request to URL <http://172.17.0.58:80/ocsinventory>
COM SERVER => HTTP Post response received <HTTP Status Code #200>
COM SERVER => Cleaning cURL library
AGENT => Prolog successfully sent
AGENT => Prolog Frequency set to 10 hour(s)
AGENT => Inventory on startup option set to  
AGENT => Inventory change forced by /NOTIFY option
AGENT => Launching hardware and software checks
INVENTORY => Logged on user ID is <go>
INVENTORY => Operating System is <Microsoft Windows 10 Pro 10.0.18363 >, description <>
INVENTORY => Operating System uses 64 bits memory address width
INVENTORY => Computer domain or workgroup is <XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
INVENTORY => User domain is <>
INVENTORY => System Manufacturer <LENOVO>, System Model <20KF001GGE>, System S/N <PC10EJFX>, Bios Manufacturer <LENOVO>, Bios Date <20/11/2019>, Bios Version <N20ET50W
.
.
.
INVENTORY => Reading last inventory state
AGENT => Sending Inventory

.
.
.
COM SERVER => Using cURL without server authentication
COM SERVER => Disabling cURL proxy support
COM SERVER => Disabling cURL SSL server validation support
COM SERVER => Sending HTTP Post request to URL <http://172.17.0.58:80/ocsinventory>
COM SERVER => HTTP Post response received <HTTP Status Code #200>
COM SERVER => Cleaning cURL library
AGENT => Inventory successfully sent
INVENTORY => Writing new inventory state
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:05.

</code>

closed with the note: Solved and/or obsolete.
in OCS Inventory NG server for Unix by (820 points)
closed by

12 Answers

0 votes
Hi,

Just for verification. Have you declared the user you setup on your windows agent (see ocsinventory.ini) on apache with htpasswd command?

unified agent can't send inventory while user is not defined in ocsinventory.cfg file.

Try without identification.

Regards

Frank
by (88.5k points)
0 votes
No i didn't. The credentiells for the Windows-Agent was on one client, Win10. But The other Agents had no credentiells.

Now, no agent submit any user oder password.

In the apache Access.log the defferent agents are present:

root@debcmdb:~# grep -i agent /var/log/apache2/access.log

127.0.0.1 - - [18/Feb/2020:06:25:01 +0100] "POST /ocsinventory HTTP/1.1" 200 12903 "-" "OCS-NG_unified_unix_agent_v2.4.2"
172.17.1.166 - - [18/Feb/2020:06:36:37 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.1.166 - - [18/Feb/2020:07:37:22 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.0.58 - - [18/Feb/2020:07:37:43 +0100] "POST /ocsinventory HTTP/1.1" 200 12903 "-" "OCS-NG_unified_unix_agent_v2.4.2"
172.17.0.58 - - [18/Feb/2020:07:37:46 +0100] "POST /ocsinventory HTTP/1.1" 200 12903 "-" "OCS-NG_unified_unix_agent_v2.4.2"
172.17.1.166 - - [18/Feb/2020:07:37:51 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.1.166 - - [18/Feb/2020:07:54:17 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.1.242 - - [18/Feb/2020:07:56:51 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.1.0.1"
172.17.1.242 - - [18/Feb/2020:07:57:02 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.1.0.1"
172.17.1.242 - - [18/Feb/2020:07:57:05 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.1.0.1"
172.17.1.166 - - [18/Feb/2020:10:38:33 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.1.166 - - [18/Feb/2020:10:38:39 +0100] "POST /ocsinventory HTTP/1.1" 200 12847 "-" "OCS-NG_WINDOWS_AGENT_v2.6.0.0"
172.17.0.58 - - [18/Feb/2020:10:38:46 +0100] "POST /ocsinventory HTTP/1.1" 200 12903 "-" "OCS-NG_unified_unix_agent_v2.4.2"
by (820 points)
0 votes
Server Konfigs:
root@debcmdb:~# cat /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
<?php
define("DB_NAME", "ocs");
define("SERVER_READ","localhost");
define("SERVER_WRITE","localhost");
define("COMPTE_BASE","ocs_3rd");
define("PSWD_BASE","ocs");
define("ENABLE_SSL","0");
define("SSL_MODE","");
define("SSL_KEY","");
define("SSL_CERT","");
define("CA_CERT","");

root@debcmdb:~# cat /etc/apache2/conf-enabled/z-ocsinventory-server.conf | grep PerlSetEnv
PerlSetEnv OCS_MODPERL_VERSION 2
PerlSetEnv OCS_DB_HOST localhost
PerlSetEnv OCS_DB_PORT 3306
PerlSetEnv OCS_DB_LOCAL ocs
PerlSetEnv OCS_DB_USER ocs_3rd
PerlSetEnv OCS_DB_SSL_ENABLED 1
PerlSetEnv OCS_DB_SSL_MODE SSL_MODE_PREFERRED
PerlSetEnv OCS_OPT_LOGPATH "/var/log/ocsinventory-server"
PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 1
PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1
PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 1
PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100
PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 1
PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1
PerlSetEnv OCS_OPT_LOGLEVEL 1
PerlSetEnv OCS_OPT_PROLOG_FREQ 12
PerlSetEnv OCS_OPT_INVENTORY_ON_STARTUP 1
PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15
PerlSetEnv OCS_OPT_SECURITY_LEVEL 0
PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600
PerlSetEnv OCS_OPT_TRACE_DELETED 0
PerlSetEnv OCS_OPT_FREQUENCY 0
PerlSetEnv OCS_OPT_INVENTORY_DIFF 1
PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1
PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1
PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1
PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7
PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1
PerlSetEnv OCS_OPT_DOWNLOAD 0
PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10
PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60
PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60
PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1
PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60
PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7
PerlSetEnv OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT 120
PerlSetEnv OCS_OPT_DEPLOY 0
PerlSetEnv OCS_OPT_ENABLE_GROUPS 1
PerlSetEnv OCS_OPT_GROUPS_CACHE_OFFSET 43200
PerlSetEnv OCS_OPT_GROUPS_CACHE_REVALIDATE 43200
PerlSetEnv OCS_OPT_IPDISCOVER 2
PerlSetEnv OCS_OPT_IPDISCOVER_BETTER_THRESHOLD 1
PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100
PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 14
PerlSetEnv OCS_OPT_IPDISCOVER_NO_POSTPONE 0
PerlSetEnv OCS_OPT_IPDISCOVER_USE_GROUPS 1
PerlSetEnv OCS_OPT_GENERATE_OCS_FILES 0
PerlSetEnv OCS_OPT_OCS_FILES_FORMAT OCS
PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0
PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp
PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 0
PerlSetEnv OCS_OPT_INVENTORY_FILTER_ENABLED 0
PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 0
PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300
PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 0
PerlSetEnv OCS_OPT_DATA_FILTER 0
PerlSetEnv OCS_OPT_REGISTRY 1
PerlSetEnv OCS_OPT_SNMP 0
PerlSetEnv OCS_OPT_SNMP_INVENTORY_DIFF 1
PerlSetEnv OCS_OPT_SNMP_PRINT_HTTPS_ERROR 1
PerlSetEnv OCS_OPT_SESSION_VALIDITY_TIME 600
PerlSetEnv OCS_OPT_SESSION_CLEAN_TIME 86400
PerlSetEnv OCS_OPT_INVENTORY_SESSION_ONLY 0
PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 0
PerlSetEnv OCS_PLUGINS_PERL_DIR "/etc/ocsinventory-server/perl"
PerlSetEnv OCS_PLUGINS_CONF_DIR "/etc/ocsinventory-server/plugins"
PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600
PerlSetEnv OCS_OPT_UPDATE 0

Database-Setting:

MariaDB [(none)]> SELECT User FROM mysql.user;

+---------+
| User    |
+---------+
| admin   |
| idoit   |
| ocs_3rd |
| root    |
+---------+

MariaDB [(none)]> SELECT host, user FROM mysql.user;

+-----------+---------+
| host      | user    |
+-----------+---------+
| localhost | admin   |
| localhost | idoit   |
| localhost | ocs_3rd |
| localhost | root    |
+-----------+---------+

MariaDB [(none)]> SELECT User, Db, Host from mysql.db;

+----------+--------------+-------------+
| User     | Db           | Host        |
+----------+--------------+-------------+
| glpiuser | glpidb       | localhost   |
| idoit    | idoit_data   | localhost   |
| idoit    | idoit_system | localhost   |
| ocs_3rd  | ocs          | localhost   |
| admin    | phpmyadmin   | localhost   |
+----------+--------------+-------------+
by (820 points)
0 votes
Can you post a screenshot of the "All computers" page, plz?
by (88.5k points)
0 votes

By the way, the install.php initialized the database perfectly.
Reinstalled the Server via install.php on Feb. 11 -12:08pm, as you can see. After that no files in database were updated... :(
 

root@debcmdb:/var/lib/mysql/ocs# pwd

/var/lib/mysql/ocs

root@debcmdb:/var/lib/mysql/ocs# ls -ll
insgesamt 14712
-rw-rw---- 1 mysql mysql   2791 Feb 11 12:08 accesslog.frm
-rw-rw---- 1 mysql mysql 131072 Feb 11 12:08 accesslog.ibd
-rw-rw---- 1 mysql mysql   4985 Feb 11 12:08 accountinfo_config.frm
-rw-rw---- 1 mysql mysql  98304 Feb 11 12:08 accountinfo_config.ibd
-rw-rw---- 1 mysql mysql   2208 Feb 11 12:08 accountinfo.frm
-rw-rw---- 1 mysql mysql 114688 Feb 11 12:08 accountinfo.ibd
-rw-rw---- 1 mysql mysql   2590 Feb 11 12:08 assets_categories.frm
-rw-rw---- 1 mysql mysql  98304 Feb 11 12:08 assets_categories.ibd
-rw-rw---- 1 mysql mysql   7528 Feb 11 12:08 batteries.frm
-rw-rw---- 1 mysql mysql 147456 Feb 11 12:08 batteries.ibd
-rw-rw---- 1 mysql mysql  10627 Feb 11 12:08 bios.frm
.
.
.
-rw-rw---- 1 mysql mysql   5023 Feb 11 12:08 temp_files.frm
-rw-rw---- 1 mysql mysql  98304 Feb 11 12:08 temp_files.ibd
-rw-rw---- 1 mysql mysql   5411 Feb 11 12:08 usbdevices.frm
-rw-rw---- 1 mysql mysql 114688 Feb 11 12:08 usbdevices.ibd
-rw-rw---- 1 mysql mysql   4611 Feb 11 12:08 videos.frm
-rw-rw---- 1 mysql mysql 114688 Feb 11 12:08 videos.ibd
-rw-rw---- 1 mysql mysql   5452 Feb 11 12:08 virtualmachines.frm
-rw-rw---- 1 mysql mysql 114688 Feb 11 12:08 virtualmachines.ibd

by (820 points)
edited by
0 votes
UPDATE: Had updated/reinstalled php-mysql, the message in error.log is gone:

root@debcmdb:~/OCSInventory-Server-NIGHTLY/OCSNG_UNIX_SERVER# tail /var/log/apache2/error.log

[Wed Feb 19 11:31:54.839802 2020] [mpm_prefork:notice] [pid 26319] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 mod_perl/2.0.10 Perl/v5.28.1 configured -- resuming normal operations

[Wed Feb 19 11:31:54.839865 2020] [core:notice] [pid 26319] AH00094: Command line: '/usr/sbin/apache2'

Now, I had installed the nightly 2020-19-02. Same issue, no data received, no errors logged... :(

What does this says in the apache error.log???

Looks like an failure into php<->mysql communications. And that exactly points to my problem... right?

root@debcmdb:~/OCSInventory-Server-NIGHTLY/OCSNG_UNIX_SERVER# tail /var/log/apache2/error.log

[Wed Feb 19 00:00:06.004550 2020] [mpm_prefork:notice] [pid 1382] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 mod_perl/2.0.10 Perl/v5.28.1 configured -- resuming normal operations

[Wed Feb 19 00:00:06.004582 2020] [core:notice] [pid 1382] AH00094: Command line: '/usr/sbin/apache2'

[Wed Feb 19 11:07:48.415391 2020] [mpm_prefork:notice] [pid 1382] AH00169: caught SIGTERM, shutting down

[Wed Feb 19 11:10:31.942501 2020] [mpm_prefork:notice] [pid 5968] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 mod_perl/2.0.10 Perl/v5.28.1 configured -- resuming normal operations

[Wed Feb 19 11:10:31.942562 2020] [core:notice] [pid 5968] AH00094: Command line: '/usr/sbin/apache2'

[Wed Feb 19 11:10:38.746833 2020] [proxy_fcgi:error] [pid 5970] [client 172.17.1.166:52300] AH01071: Got error 'PHP message: PHP Warning:  mysqli_real_escape_string(): Couldn't fetch mysqli in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 67PHP message: PHP Warning:  mysqli_query(): Couldn't fetch mysqli in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 104PHP message: PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result, bool given in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 38', referer: http://172.17.0.58/ocsreports/index.php?function=server_infos

[Wed Feb 19 11:11:02.987024 2020] [proxy_fcgi:error] [pid 5978] [client 172.17.1.166:52326] AH01071: Got error 'PHP message: PHP Warning:  mysqli_real_escape_string(): Couldn't fetch mysqli in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 67PHP message: PHP Warning:  mysqli_query(): Couldn't fetch mysqli in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 104PHP message: PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result, bool given in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 38', referer: http://172.17.0.58/ocsreports/index.php?first
by (820 points)
edited by
0 votes
Hi,

Verify the installation of mysqli and pdo extensions for php.

Regards

Frank
by (88.5k points)
0 votes

Hullo,

in reason I had no idea how to check it, I asked aunt google. Result, there ist now a new php-file present.  ( checkfuckingmysqli.php )

(Meanwhile I changed the database user from ocs_3rd to ocs4th...)

Content:

<code><?php
$link 
mysqli_connect("127.0.0.1""ocs4th""ocs""ocs");

if (!
$link) {
    echo 
"Error: Unable to connect to MySQL." PHP_EOL;
    echo 
"Debugging errno: " mysqli_connect_errno() . PHP_EOL;
    echo 
"Debugging error: " mysqli_connect_error() . PHP_EOL;
    exit;
}

echo 
"Success: A proper connection to MySQL was made! The my_db database is great." PHP_EOL;
echo 
"Host information: " mysqli_get_host_info($link) . PHP_EOL;

mysqli_close($link);
?></code>

Result:

Success: A proper connection to MySQL was made! The my_db database is great. Host information: 127.0.0.1 via TCP/IP

by (820 points)
0 votes

mysqli and pdo works fine... :(

created another testing file, now for pdo.

Content:
<?php $servername = "localhost"; $username = "ocs4th"; $password = "ocs"; $database = "ocs"; try { $conn = new PDO("mysql:host=$servername;dbname=$database", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } ?>

Result:

Connected successfully

by (820 points)
0 votes

btw, today my win10 client sent inventory 3 times...

http://dpaste.com/36A8Y4S

by (820 points)
 
Powered by Question2Answer
...