Fresh Install on CentOS Linux TimeZone Catch-22

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
SkyMoCo
Posts: 4
Joined: Tue Apr 07, 2020 4:23 pm

Fresh Install on CentOS Linux TimeZone Catch-22

Post by SkyMoCo » Tue Apr 07, 2020 4:29 pm

I have a fresh install of CentOS Linux 7.6 and followed the instructions to the letter. (I have tried twice from scratch with the same result).

zoneminder.x86_64 1.34.6-1.el7 @rpmfusion-free-updates
zoneminder-common.x86_64 1.34.6-1.el7 @rpmfusion-free-updates
zoneminder-httpd.x86_64 1.34.6-1.el7 @rpmfusion-free-updates


One of the final steps is to set the timezone via the web gui, but when I try and bring up the web gui I get error 500 with this in the log:
[root@pvzoneminder httpd]# tail -f ssl_error_log
[Tue Apr 07 08:36:57.017134 2020] [:error] [pid 24393] [client 172.26.0.121:59070] PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the da te_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /usr/share/zoneminder/www/ includes/functions.php:2389\nStack trace:\n#0 /usr/share/zoneminder/www/includes/functions.php(2389): DateTime->__construct()\n#1 /usr/share/zone minder/www/index.php(207): check_timezone()\n#2 {main}\n thrown in /usr/share/zoneminder/www/includes/functions.php on line 2389

SkyMoCo
Posts: 4
Joined: Tue Apr 07, 2020 4:23 pm

Re: Fresh Install on CentOS Linux TimeZone Catch-22

Post by SkyMoCo » Tue Apr 07, 2020 5:05 pm

For what it's worth. I did a yum update and rebooted and low and behold, it now works. I did have to login as apache and touch the file "touch /var/log/zoneminder/web_php.log"

Seems to work now.

SkyMoCo
Posts: 4
Joined: Tue Apr 07, 2020 4:23 pm

Re: Fresh Install on CentOS Linux TimeZone Catch-22

Post by SkyMoCo » Tue Apr 07, 2020 6:05 pm

However, the gui is a bit off, there are words instead of icons for a lot of things and I see these errors in the log.

Code: Select all

04/07/20 10:55:43.851826 web_php[13517].WAR [172.26.0.21] [Failed linking skins/classic/views/js/state.js to skins_classic_views_js_state-base-1583524358.js] at /usr/share/zoneminder/www/includes/functions.php line 2216
04/07/20 10:55:43.854640 web_php[13517].WAR [172.26.0.21] [Failed linking skins/classic/js/base.js to skins_classic_js_base-base-1583524358.js] at /usr/share/zoneminder/www/includes/functions.php line 2216
04/07/20 10:55:43.856759 web_php[13517].WAR [172.26.0.21] [Failed linking skins/classic/js/skin.js to skins_classic_js_skin-base-1583524358.js] at /usr/share/zoneminder/www/includes/functions.php line 2216
04/07/20 10:55:43.858849 web_php[13517].WAR [172.26.0.21] [Failed linking js/logger.js to js_logger-base-1583524358.js] at /usr/share/zoneminder/www/includes/functions.php line 2216
04/07/20 10:55:43.860888 web_php[13517].WAR [172.26.0.21] [Failed linking skins/classic/views/js/console.js to skins_classic_views_js_console-base-1583524358.js] at /usr/share/zoneminder/www/includes/functions.php line 2216
Attachments
ZoneMinderSS.png
ZoneMinderSS.png (46.95 KiB) Viewed 1832 times

SureMan
Posts: 1
Joined: Sun Nov 15, 2020 10:27 am

Re: Fresh Install on CentOS Linux TimeZone Catch-22

Post by SureMan » Tue Dec 15, 2020 4:55 pm

I know this is old, but I am having the same problem using 1.34.22 from rpmfusion. It isn't fixing itself though :( Hopefully someone comes up with a fix.

cowpants
Posts: 1
Joined: Thu Jan 14, 2021 3:49 am

Re: Fresh Install on CentOS Linux TimeZone Catch-22

Post by cowpants » Thu Jan 14, 2021 3:56 am

I ran into this same error after doing an install on a fresh Centos 7.9 system. I was able to get things going by adding date.timezone = "America/Halifax" into the /etc/php.ini file. After that, the page would load properly and I would not get any more 500 responses. I then properly set the timezone in the options as the README said to do.

I know the README said not to do that, but nothing else would work. It was a PHP fatal error without it. Maybe there is a PHP setting where we could ignore certain errors and still run? not sure.

Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: Fresh Install on CentOS Linux TimeZone Catch-22

Post by Paranoid » Fri Jan 15, 2021 4:09 pm

You need to set the date.timezone setting in the php.ini files. You should be able to find them with the following command.

Code: Select all

sudo find /etc -name php.ini

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests