HTTP Error 500 - Possible laravel problems

hello everyone,

i get the following error when i try to reach libre from my web browser. validation also returns with some errors. i am using FreeBSD 11.1.

i appreciate any help. thank you in advance.

Cannot redeclare str_contains() (previously declared in /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Support/helpers.php:773) [2] => /usr/local/www/librenms/includes/common.php [3] => 1377 )

PHP Fatal error: Cannot instantiate abstract class LibreNMS\Validations\BaseValidation in /usr/local/www/librenms/LibreNMS/Validator.php on line 49

Component Version
LibreNMS 1.39-34-g303336bce
DB Schema ?
PHP 5.6.35
RRDTool 1.7.0


I wonder if you have some mix up with files as str_contains has a safety checkin includes/common.php but on different lines than your output is reported.

Does validate show anything else past the ===== lines


no, validation shows nothing under the ===== lines

i ran php composer_wrapper.php install --no-dev command cause i am having some issues with my libre installation. ( i was getting errors after daily update jobs- this command was suggested as a solution.

now i cant even get to frontpage. i dont have any php programming experience.

What does the front page say?

it says http error 500.

with debug mode is on , it says Array ( [0] => 1 [1] => Cannot redeclare str_contains() (previously declared in /usr/local/www/librenms/vendor/laravel/framework/src/Illuminate/Support/helpers.php:773) [2] => /usr/local/www/librenms/includes/common.php [3] => 1377 )

I think your code is out of date, run git status.


it outputs the following information . too many information on the screen. not sure whether to post all of them.

On branch master
Your branch is up to date with ‘origin/master’.

Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

    modified:   LibreNMS/Alert/Transport/Api.php
    modified:   LibreNMS/Alert/Transport/Boxcar.php
    modified:   LibreNMS/Alert/Transport/Canopsis.php
    modified:   LibreNMS/Alert/Transport/Ciscospark.php
    modified:   LibreNMS/Alert/Transport/Clickatell.php
    modified:   LibreNMS/Alert/Transport/Dummy.php
    modified:   LibreNMS/Alert/Transport/Elasticsearch.php
    modified:   LibreNMS/Alert/Transport/Hipchat.php
    modified:   LibreNMS/Alert/Transport/Irc.php
    modified:   LibreNMS/Alert/Transport/Jira.php
    modified:   LibreNMS/Alert/Transport/Mail.php
    modified:   LibreNMS/Alert/Transport/Msteams.php
    modified:   LibreNMS/Alert/Transport/Nagios.php
    modified:   LibreNMS/Alert/Transport/Osticket.php
    modified:   LibreNMS/Alert/Transport/Pagerduty.php
    modified:   LibreNMS/Alert/Transport/Playsms.php
    modified:   LibreNMS/Alert/Transport/Pushbullet.php

Yeah, you are going to need to fix that.

./scripts/github-remove -d will revert all those, then, you can run ./ again.

1 Like

sir ,

everything went back to normal after that command!!
thank you so much.

what was the exact problem of my libre distro ? :slight_smile:

1 Like

Some sort of git update failure, perhaps you had some locally modifed files?

Should be good to go now.

1 Like