Errors after last update

I am using libre for more then month and its working very good so far.After latest update ( 5-6 mins ago) it started to show errors in validate.php. Best part is that it is still working, even i’m getting an errors while running validate.php. Libre is running on CentOS 7, php 5.4.16. Validate is showing next errors:

[[email protected] /]# /opt/librenms/validate.php
[FAIL] Syntax error in config.php
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git

Version info:
PHP Fatal error: Uncaught exception ‘Exception’ with message ‘DateTime::__const ruct(): Failed to parse time string (@) at position 0 (@): Unexpected character’ in /opt/librenms/validate.php:82
Stack trace:
#0 /opt/librenms/validate.php(82): DateTime->__construct(’@’, Object(DateTimeZon e))
#1 {main}
thrown in /opt/librenms/validate.php on line 82
Is there anything i should do to fix this? Thanks in advance.

Please make sure you set a timezone in php.ini

Hi laf,

tnx for reply. I have timezone specified in php.ini. Yesterday i was runnung validate.php and it did not returned any errors. I’m 90% sure there was no changes in server configuration. This issue started today, after updating to latest code.
php -i | grep "Loaded Configuration File"
Loaded Configuration File => /etc/php.ini
Containing this line:
date.timezone = Europe/Belgrade
Any further hint?

You can make this closed. It has fixed itself. I have not changed a single thing on server… Anyway, thanks for help.

You must run validate.php from the /opt/librenms directory, you cannot run it /opt/librenms


looks like you got the point. For unknown reason i have been starting a validate script from root directory. Sorry for false alarm, guys,and thanks again for help. My bad.

I just sent a change that allows validate.php and other scripts from anywhere.

1 Like