Error to first install - Don't access to http://mydomain.com/install.php

Hi all,

I try to install LibreNMS for the first time.
I’ve tried it in my debian webserver, and i get an error when I come to http://mydomain.com/install.php
And when I try install it to a Debian 9 from scratch, I get the sames error :

http://mydomain.com/install.php
Blank page with :

Parse error : syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /opt/librenms/vendor/zendframework/zend-diactoros/src/functions/marshal_uri_from_sapi.php on line 83

Documentation used step by step : Redirecting...

PHP 7.2 not available to the original repository Debian stretch (9.9.0), so i’ve added this one :
deb https://packages.sury.org/php/ $(lsb_release -sc) main
And I’ve been activate php7.2 to apache ( a2enmod php7.2 && systemctl restart apache2)

As well I’ve replaced su - librenms by sudo -i -u librenms

I’ve tried with php7.3 → Sames error

Result from./validate.php

PHP Fatal error: Uncaught Error: Call to undefined function LibreNMS\Util\app() in /opt/librenms/LibreNMS/Util/Laravel.php:71
Stack trace:
#0 /opt/librenms/LibreNMS/DB/Eloquent.php(111): LibreNMS\Util\Laravel::isBooted()
#1 /opt/librenms/LibreNMS/DB/Eloquent.php(92): LibreNMS\DB\Eloquent::DB()
#2 /opt/librenms/LibreNMS/Util/Version.php(58): LibreNMS\DB\Eloquent::isConnected()
#3 /opt/librenms/includes/common.php(1160): LibreNMS\Util\Version->database()
#4 /opt/librenms/validate.php(72): version_info()
#5 [internal function]: {closure}()
#6 {main}
thrown in /opt/librenms/LibreNMS/Util/Laravel.php on line 71
[FAIL] config.php does not exist, please copy config.php.default to config.php

And if I try to create a config.php with my mysql database information, I’ve a blank page when I try to access to my LibreNMS WUI.

Do you have an idea ?

PS : Sorry for my english, I’m a french user.

This is the fonction to block install :

Ligne 83 to marshal_uri_from_sapi.php file

$marshalIpv6HostAndPort = function (array $server, string $host, ?int $port) : array {
    $host = '[' . $server['SERVER_ADDR'] . ']';
    $port = $port ?: 80;
    if ($port . ']' === substr($host, strrpos($host, ':') + 1)) {
        // The last digit of the IPv6-Address has been taken as port
        // Unset the port so the default port can be used
        $port = null;
    }
    return [$host, $port];
};

Be4 u go to your web installer u need to install manual 1st, did u do that to?

Did u follow the tutorial as on
https://docs.librenms.org/Installation/

This step was the first time. I thought it was my current web server configuration.
Now I’ve a Debian 9 from scratch, and I get the sames error.

Yep, of course : This one

Humm i dont know about debian,

i know if u got a black page the config.php is not good filled in
(copy the example and edit it)

for the PHP error i have no clue,
maybe try an other php version ( diffrent repo?)

  • No errors on the manual installs ( all PHP-extensions / composer etc?)

I tried this… Blank page.

Sames error with PHP7.3

Nothing : all steps are completed correctly… no error.

I think I’m going on Ubuntu.
It’s better to take Apache or NGINX ?

Both have pro and cons…

I like apache, others like nginx.

My setup is centos7 php7.3 (remi) apache 2.4.xx(codeit) php-fpm mariadb 10.3.xx

So far no issues…

So it depends what u like…

Hi, I get the same error.

I’m on Ubuntu 18.04 /Apache and used the same installation instructions you used (twice) and keep getting the error. Did you get a resolution?

Hi @FJC

In fact, i’ve stopped installation LibreNMS.
When I tried to Ubuntu 18.04 and Apache, installation page appears, but I use a special character to mySQL password (@), and installation script LibreNMS doesn’t work with this.

So, I work with Zabbix :roll_eyes:

Zabbix may be more complex to this configuration but I think more functionality.

This means you didn’t install dependencies as described in the docs:

su - librenms
./scripts/composer_wrapper.php install --no-dev
exit