PHP CLI timezone not set, but it is

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

Moderators: Developers, Moderators

Post Reply
CaptObvious41
Posts: 3
Joined: Wed Apr 20, 2022 11:23 am

PHP CLI timezone not set, but it is

Post by CaptObvious41 »

Ubuntu 20.04 clean install as of this morning following a guide from January of this year.

For some reason, the cacti installation fails the prechecks for the PHP CLI timezone field. I checked and it's the same as the php.ini file entry to PHP Web (apache2) so it should be working. Both are 'America/New_York' but Cacti says otherwise.

Cacti shows /etc/GMT+4 for PHP Web. and blank for PHP CLI. Is it possible it's getting the information from somewhere else?
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: PHP CLI timezone not set, but it is

Post by macan »

more php.ini files?

Try run script:
<?php
phpinfo();
?>

Which timezone is in displayed?
Let the Cacti grow!
CaptObvious41
Posts: 3
Joined: Wed Apr 20, 2022 11:23 am

Re: PHP CLI timezone not set, but it is

Post by CaptObvious41 »

America/New_York

I did a find for all PHP.ini files and its only those two. /apache2 and /cli directories. Both have the identical entry for date.timezone.
CaptObvious41
Posts: 3
Joined: Wed Apr 20, 2022 11:23 am

Re: PHP CLI timezone not set, but it is

Post by CaptObvious41 »

in my stupidity I neglected to remove the ; commenting out the date.timezone line. I'll leave this here so others can get a laugh.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests