munkireport / munkireport-php

A reporting tool for munki
MIT License
393 stars 138 forks source link

MySQL Issue with new install of 2.15.0 or 2.15.1 #874

Closed thecanadianroot closed 7 years ago

thecanadianroot commented 7 years ago

Hi,

I am currently creating a new instance from scratch and there seems to be problems with paths as my httpd log says bellow:

[Tue Sep 19 09:47:12.033432 2017] [:error] [pid 6816] [client 10.6.169.201:52142] PHP Warning:  require_once(/opt/rona//app/models/domdocument.php): failed to open stream: No such file or directory in /opt/rona/app/helpers/site_helper.php on line 135
[Tue Sep 19 09:47:12.033461 2017] [:error] [pid 6816] [client 10.6.169.201:52142] PHP Fatal error:  require_once(): Failed opening required '/opt/rona//app/models/domdocument.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/rona/app/helpers/site_helper.php on line 135
[Tue Sep 19 09:47:13.448339 2017] [:error] [pid 6893] [client 10.6.215.53:1645] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'reports.network' doesn't exist' in /opt/rona/system/kissmvc_core.php:461\nStack trace:\n#0 /opt/rona/system/kissmvc_core.php(461): PDO->prepare('SELECT COUNT(1)...', Array)\n#1 /opt/rona/system/kissmvc.php(215): KISS_Model->prepare('SELECT COUNT(1)...')\n#2 /opt/rona/app/modules/network/network_controller.php(77): Model->query('SELECT COUNT(1)...')\n#3 [internal function]: Network_controller->routers()\n#4 /opt/rona/app/controllers/module.php(69): call_user_func_array(Array, Array)\n#5 [internal function]: munkireport\\controller\\Module->load('network', 'routers')\n#6 /opt/rona/system/kissmvc_core.php(90): call_user_func_array(Array, Array)\n#7 /opt/rona/system/kissmvc.php(13): KISS_Engine->__construct(Array, 'show', 'index', 'AUTO')\n#8 /opt/rona/index.php(135): Engine->__construct(Array, 'show', 'index', 'AUTO')\n#9 {main}\n  thrown in /opt/rona/system/kissmvc_core.php on line 461, referer: https://helloworld.com/index.php?/show/dashboard

Here is my config.php:


<?php
#$conf['index_page'] = '';
#$conf['subdirectory'] = '/';
$conf['sitename'] = 'macOS Reports';
$conf['auth_secure'] = TRUE;
#$conf['allow_migrations'] = TRUE;
$conf['client_passphrases'] = array('thisisapassphrase');
$conf['ip_ranges']['Marketing'] = '10.6.169.';
$conf['ip_ranges']['Windows'] = '10.68.';
$conf['ip_ranges']['WiFi'] = '10.6.207.';
#$conf['ipv4routers']['Wired'] = array('10.6.169.', '10.68.');
#$conf['ipv4routers']['WiFi'] = '10.6.207.';
#$conf['ipv4routers']['Link-local'] = array('169.254.%');
$conf['apps_to_track'] = array('Java', 'Firefox', 'Google Chrome');
$auth_config['bureautique'] = 'thisisapassword';
$conf['roles']['admin'] = array('bureautique');
$conf['dashboard_layout'] = array(
        array('client','new_clients'), /*client is actually two widgets*/
        array('munki','manifests'),
        array('pending', 'pending_apple', 'pending_munki'),
        array('munki_versions','app','uptime'),
        array('os','messages'),
        array('hardware_model','hardware_age'),
        array('network_vlan','smart_status','bound_to_ds'),
        array('network_location', 'external_displays_count'),
        array('disk_report','installed_memory')
);
$conf['modules'] = array('appusage', 'ard', 'bluetooth','certificate','directory_service','disk_report','displays_info','event','extensions','fan_temps','fonts','gpu','installhistory','inventory','localadmin','machine','managedinstalls','munkiinfo','munkireport','munkireportinfo','network','network_shares','power','printer','profile','reportdata','sccm_status','security','service','smart_stats','softwareupdate','usb','user_sessions','wifi');
$conf['debug'] = TRUE;
$conf['pdo_dsn'] = 'mysql:host=localhost;dbname=reports';
$conf['pdo_user'] = 'reportuser';
$conf['pdo_pass'] = 'databasepassword';
$conf['pdo_opts'] = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');

When a client reports, I can see that theres a new computer but when I try to see information on this computer, it says "Client with serial number 'XXXXXXXXXXXXX' does not exist"

bochoven commented 7 years ago

You are missing the libxml php extension

thecanadianroot commented 7 years ago

Oh, my bad sorry :/

Thank you very much, you made my day! 👍