cacti.log errors

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

Moderators: Developers, Moderators

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

cacti.log errors

Post by mrig »

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: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti.log errors

Post by netniV »

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.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrig
Posts: 3
Joined: Tue Feb 26, 2019 10:40 pm

Re: cacti.log errors

Post by mrig »

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

Post by mrig »

Found the issue. Used timezone American instead of America

Thanks for help.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti.log errors

Post by netniV »

Quite an easy thing to miss that :) Glad your sorted.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests