cacti.log errors

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Moderators, Developers

Post Reply
Author
Message
mrig
Posts: 3
Joined: Tue Feb 26, 2019 10:40 pm

cacti.log errors

#1 Post by mrig » Mon Mar 25, 2019 5:14 pm

Hi
I'm a newbie to Cacti and novice at Linux so bear with me if I missed something simple.

For the most part the system seems to work on the localhost device on graphing cpu/memory/disk usage.

I checked the cacti.log file and it producing a huge amount of entries (~100 per minute) with just two lines that repeat over and over:

2019/03/25 21:57:57 - CMDPHP PHP ERROR WARNING Backtrace: (/clog.php[27]:include(), /include/auth.php[28]:require_once(), /include/global.php[402]:include_once(), /include/global_arrays.php[1294]:date(), CactiErrorHandler())
2019/03/25 21:57:57 - ERROR PHP : date(): Invalid date.timezone value 'American/Los_Angeles', we selected the timezone 'UTC' for now. in file: /opt/cacti/include/global_arrays.php on line: 1294

I know I got the timezone configured in the php configuration file correct, but it seems like there is a conversion happening someplace that is trying to fit in using the UTC format.

I have no idea on the CMDPHP PHP ERROR message.

Thanks in advance for you help.
IG

netniV
Cacti Guru User
Posts: 2691
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti.log errors

#2 Post by netniV » Tue Mar 26, 2019 6:45 pm

Actually, you may think you have the write timezone in PHP but that error suggests that you don't as it's actually PHP giving out the error.

mrig
Posts: 3
Joined: Tue Feb 26, 2019 10:40 pm

Re: cacti.log errors

#3 Post by mrig » Wed Mar 27, 2019 5:16 pm

I checked my settings in the php.ini files for both cli and web versions. Even used your php code on another post to check
1.2.2 checks both the CLI and the Web PHP.INI's have the timezone value set. You can create a file in your root cacti directory called tz.php and put the following code in it:

Code:
<?php
echo "timezone: " . ini_get('date.timezone') . PHP_EOL;


Then you can run that in your command line using "php -q tz.php" and by browsing to <cacti_url>/tz.php

They should both be the same. If not, you've missed a php.ini somewhere.
Both the cli and the web came back as "timezone: American/Los Angeles" - which is the correct timezone.

Where else should I check?

Thanks
IG

mrig
Posts: 3
Joined: Tue Feb 26, 2019 10:40 pm

Re: cacti.log errors

#4 Post by mrig » Wed Mar 27, 2019 5:43 pm

Found the issue. Used timezone American instead of America

Thanks for help.

netniV
Cacti Guru User
Posts: 2691
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti.log errors

#5 Post by netniV » Thu Mar 28, 2019 4:27 am

Quite an easy thing to miss that :) Glad your sorted.

Post Reply