PHP error when attempting to install Loganalyzer 4.1.5
<p>I am a pretty novice Linux user. I've configured a LAMP server to use primarily for a central syslog server. Ubuntu 16.04, with the latest stable versions of Apache, php7, and mariadb. I've primarily been following this tutorial to configure Loganalyzer (<a href="https://cloud4wi.zendesk.com/hc/en-us/articles/201827513-How-to-install-and-configure-a-SysLog-Server" rel="nofollow noreferrer">https://cloud4wi.zendesk.com/hc/en-us/articles/201827513-How-to-install-and-configure-a-SysLog-Server</a>).</p>

<p>I successfully tested sending syslog messages to it and can see the database is collecting them so far. I've also successfully tested php can connect to the database I've setup for rsyslog</p>

<pre><code>    &lt;?php
    $link = mysqli_connect("{host}", "{user}", "{password}", "{database}");

    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!." . PHP_EOL;
    echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;

    mysqli_close($link);
    ?&gt;
</code></pre>

<p>I then run this command from the command line php -f db-test.php and it seems to work. </p>

<p>My problem seems to arise when running the Loganalyzer install.php file. </p>

<p>At the section where I include the database info and creds, it gives me a fairly useless error. </p>

<blockquote>
  <p>ERROR: Cannot use the database 'rsyslogdb'! If the database does not
  exists, create it or check user access permissions! Mysql Error -
  Description:</p>
</blockquote>

<p>I've checked my apache logs, and they seemed to point to a problem with the install.php script. Initially I got an error stating a "call to undefined function mysql_connect" which is where I found out the install script was using old functions (<a href="https://stackoverflow.com/questions/34088373/call-to-undefined-function-mysql-connect-after-upgrade-to-php-7">&quot;Call to undefined function mysql_connect()&quot; after upgrade to php-7</a>). This is rather curious as the notes from Loganalyzer seem to indicate they fixed this issue (<a href="http://loganalyzer.adiscon.com/news/loganalyzer-v4-1-5-v4-stable-released/" rel="nofollow noreferrer">http://loganalyzer.adiscon.com/news/loganalyzer-v4-1-5-v4-stable-released/</a>)</p>

<p>I just changed two old functions in the script to use mysqli_connect and mysqli_select_db to see what would happen. I got a little further, but the apache logs are still showing errors and I cannot progress in the Loganalyzer install. </p>

<pre><code>[Mon Dec 12 15:23:21.563908 2016] [:error] [pid 1400] [client {ip}:50958] PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, string given in /var/www/html/loganalyzer/install.php on line 382, referer: http://{ip}/loganalyzer/install.php?step=3

    &gt;&gt;&gt; this is the line from install.php
        // Try to select the DB!
                                $db_selected = mysqli_select_db($_SESSION['UserDBName'], $link_id);
                                if(!$db_selected)
                                        RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORACCESSDENIED'], $_SESSION['UserDBName']) . "&lt;br&gt;" . DB_ReturnSimpleErrorMsg());


[Mon Dec 12 15:23:21.563997 2016] [:error] [pid 1400] [client {IP}:50958] PHP Warning:  mysqli_errno() expects parameter 1 to be mysqli, integer given in /var/www/html/loganalyzer/include/functions_db.php on line 215, referer: http://{ip}/loganalyzer/install.php?step=3
[Mon Dec 12 15:23:21.564013 2016] [:error] [pid 1400] [client {IP}:50958] PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, integer given in /var/www/html/loganalyzer/include/functions_db.php on line 215, referer: http://{ip}/loganalyzer/install.php?step=3

    &gt;&gt;&gt;&gt; this is the line from functions_db.php
        // Return Mysql Error
                return "Mysql Error " . mysqli_errno($userdbconn) . " - Description: " . mysqli_error($userdbconn);
}
</code></pre>

<p>I've been banging my head against the wall for a while now. Can someone point me in the right direction please? </p>