Undefined property $dsn when navigating to NagVis in web browser

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Environment:

    Ubuntu 16.04

    Nagios Core 4.1.1

    NagVis 1.9

    Apache 4.2


    Installed PHP packages are:


    ii libapache2-mod-php 1:7.1+54+ubuntu16.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (Apache 2 module) (default)

    ii libapache2-mod-php7.0 7.0.22-2+ubuntu16.04.1+deb.sury.org+4 amd64 server-side, HTML-embedded scripting language (Apache 2 module)

    ii libapache2-mod-php7.1 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)

    ii php-common 1:54+ubuntu16.04.1+deb.sury.org+1 all Common files for PHP packages

    ii php-gd 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all GD module for PHP [default]

    ii php-mbstring 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all MBSTRING module for PHP [default]

    ii php-net-socket 1.0.14-1build1 all PHP PEAR Network Socket Interface module

    ii php-pear 1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 all PEAR Base System

    ii php-xml 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]

    ii php7.0-cli 7.0.22-2+ubuntu16.04.1+deb.sury.org+4 amd64 command-line interpreter for the PHP scripting language

    ii php7.0-common 7.0.22-2+ubuntu16.04.1+deb.sury.org+4 amd64 documentation, examples and common module for PHP

    ii php7.0-json 7.0.22-2+ubuntu16.04.1+deb.sury.org+4 amd64 JSON module for PHP

    ii php7.0-opcache 7.0.22-2+ubuntu16.04.1+deb.sury.org+4 amd64 Zend OpCache module for PHP

    ii php7.0-readline 7.0.22-2+ubuntu16.04.1+deb.sury.org+4 amd64 readline module for PHP

    ii php7.1-cli 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language

    ii php7.1-common 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP

    ii php7.1-gd 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 GD module for PHP

    ii php7.1-json 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 JSON module for PHP

    ii php7.1-mbstring 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP

    ii php7.1-opcache 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP

    ii php7.1-readline 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 readline module for PHP

    ii php7.1-sqlite3 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 SQLite3 module for PHP

    ii php7.1-xml 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP


    All NagVis prereqs are installed, NagVis installed to use mklivestatus, installation had no errors. mklivestatus backend itself is working fine: `echo 'GET contacts' | unixcat /usr/local/nagios/var/rw/live` displays all Nagios contacts.

    Trying to bring up NagVis in a web browser, I enter http://<nagios_server>/nagvis (tried this in Chrome 62.0.3202.94 and Firefox 50.1.0), this error is displayed in both browsers:


    Error: (0) Undefined property: CorePDOHandler::$dsn

    URL: /nagvis/frontend/nagvis-js/index.php


    File: /usr/local/nagvis/share/server/core/classes/CoreAuthModPDO.php


    Line: 58


    #0 /usr/local/nagvis/share/server/core/classes/CoreAuthModPDO.php(58): nagvisExceptionErrorHandler(8, 'Undefined prope...', '/usr/local/nagv...', 58, Array)
    #1 /usr/local/nagvis/share/server/core/classes/CoreAuthHandler.php(47): CoreAuthModPDO->__construct()
    #2 /usr/local/nagvis/share/server/core/functions/index.php(44): CoreAuthHandler->__construct()
    #3 /usr/local/nagvis/share/frontend/nagvis-js/index.php(53): require('/usr/local/nagv...')
    #4 {main}


    /var/log/apache2/error.log shows:


    Could not initialize a database connection: could not find driver



    What else do I need to do to bring up NagVis in a web browser?