Page 1 of 2

No web interface after upgrade to 1.36.21

Posted: Sun Aug 07, 2022 8:44 pm
by Taurus61
All,

I am running zm on a Rocky Linux 8.5 system and via a webmin alert i started the suggest upgrade to 1.36.21.1
After a successful upgrade i upgrade the database also which went smoothless. But https://###.###.###.###/zm gives no response at all.
stop/start zm and stop/start apache doesn't help.
Only thing i can find in the httpd logs which i think it is not good is in the access log
[07/Aug/2022:03:17:24 +0200] "GET /zm/index.php?view=image&fid=4&eid=63866&show=analyse HTTP/1.1" 500 which refered to an internal server error.
Maybe there is someone who did the same upgrade and can help or can point me in a right direction
Thanks in advance
Paul

Re: No web interface after upgrade to 1.36.21

Posted: Sun Aug 07, 2022 9:14 pm
by Taurus61
Oh forget to mention that in /var/log/messages zoneminder seems to run normal. I see the same messages as before the upgrade

Re: No web interface after upgrade to 1.36.21

Posted: Sun Aug 07, 2022 10:29 pm
by knight-of-ni
check if the php-intl package is installed:

Code: Select all

rpm -qa |grep php-intl
If it is not, then install it and restart httpd:

Code: Select all

sudo dnf install php-intl
sudo systemctl restart httpd
Please report back

Re: No web interface after upgrade to 1.36.21

Posted: Mon Aug 08, 2022 6:09 am
by Taurus61
Hi,
Webinterface is back again.
Many many thanks

Greetz, Paul

Re: No web interface after upgrade to 1.36.21

Posted: Mon Aug 08, 2022 6:12 pm
by knight-of-ni
Thanks for the feedback.

Changes will be reflected in the new rpm's I built yesterday.

They are in RPMFusion testing repos now and will take a week to make it to RPMFusion stable repos.

Re: No web interface after upgrade to 1.36.21

Posted: Tue Aug 09, 2022 2:55 am
by zSprawl
I had this same problem and resolved it the same way, but now all of the time/date stamps in the logs are "false".

The time/dates on the camera feeds are fine, but in the logs, it just shows false.

Did this happen to you too? I rolled back my upgrade until I can find an answer.

Thanks!

Re: No web interface after upgrade to 1.36.21

Posted: Tue Aug 09, 2022 1:29 pm
by Taurus61
No problem concerning dates in the logs.
Once ZoneMinder has been installed, you must follow a README file to complete the installation. Have a look in the README.httpd. There is something about setting the timezone. Maybe this will help

Greetz, Paul

Re: No web interface after upgrade to 1.36.21

Posted: Tue Aug 09, 2022 1:44 pm
by Taurus61
Sorry. I was a little to quick in my response . The clock in the logs are 2 hours ahead. So i face also a time problem over here.
If i find out what it is i will let you know. I hope that's vice versa :-)

Greetz, Paul

Re: No web interface after upgrade to 1.36.21

Posted: Tue Aug 09, 2022 5:43 pm
by zSprawl
Yeah I messed with the php.ini settings for a while.

When you enable show errors in the php.ini, the ssl_error logs said something about expecting an array. I rolled back so I can’t grab the exact error but if others aren’t experiencing it in the next few days, I’ll go through it again.

Thanks for checking yours too. It works but I’d like the time stamps for when there are issues.

Re: No web interface after upgrade to 1.36.21

Posted: Tue Aug 09, 2022 9:03 pm
by Taurus61
I spend a couple of hours to the time problem without result. I am in Timezone Europe / Amsterdam (CEST +2hour)
The logs says 8:00 PM while it is 10:00 PM
I am glad that the interface is back again. This time problem if have no time to figure it out. Maybe later. Don't believe it's a big problem
But if someone finds out what the problem is i surely want to know

Re: No web interface after upgrade to 1.36.21

Posted: Wed Aug 10, 2022 1:36 pm
by iconnor
Try the following change which is in 1.36.24

diff --git a/web/includes/config.php.in b/web/includes/config.php.in
index de03da809..c18205b5f 100644
--- a/web/includes/config.php.in
+++ b/web/includes/config.php.in
@@ -150,9 +150,9 @@ require_once('database.php');
require_once('logger.php');
loadConfig();
if (ZM_LOCALE_DEFAULT) {
- $dateFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::NONE);
- $dateTimeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::LONG);
- $timeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::NONE, IntlDateFormatter::LONG);
+ $dateFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::NONE,ZM_TIMEZONE);
+ $dateTimeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::SHORT, IntlDateFormatter::LONG,ZM_TIMEZONE);
+ $timeFormatter = new IntlDateFormatter(ZM_LOCALE_DEFAULT, IntlDateFormatter::NONE, IntlDateFormatter::LONG,ZM_TIMEZONE);
}

Re: No web interface after upgrade to 1.36.21

Posted: Wed Aug 10, 2022 4:22 pm
by zSprawl
Thanks man, no luck though.

I went through the upgrade again and turned on errors. Here is the exact error:

PHP Warning: IntlDateFormatter::format(): datefmt_format: takes either an array or an integer timestamp value or a DateTime object in /usr/share/zoneminder/www/ajax/log.php on line 171, referer: https://zm7.machinecorps.local/zm/index.php?view=log

It makes it so the word error appears in lieu of the time stamp in the logs. Of course, if you look at the logs at the command prompt, they look fine, so it's along the lines of date parsing.

Re: No web interface after upgrade to 1.36.21

Posted: Wed Aug 10, 2022 7:29 pm
by iconnor
Okay I think the issue is that our timestamps include fractions of a second... and php8 or 8.1 or whatever now only accepts integers.

Try replacing that line with:

$row['DateTime'] = empty($row['TimeKey']) ? '' : $dateTimeFormatter->format(intval($row['TimeKey']));

Re: No web interface after upgrade to 1.36.21

Posted: Wed Aug 10, 2022 7:37 pm
by zSprawl
That worked perfectly, thank you!!

Re: No web interface after upgrade to 1.36.21

Posted: Wed Aug 10, 2022 8:16 pm
by Taurus61
Yes. Over here too.
Thanks so much.
I am not a ajax, perl, php expert so did i messed up something during the upgrade to 1. 36.21 or is it just a bug and will be fixed in next versions?
Again thanks

Paul