User interface crashes (HTTP 500) with workaround

Current Development version likely to have breaking changes
Post Reply
gyzod
Posts: 10
Joined: Wed Jun 15, 2022 8:52 pm

User interface crashes (HTTP 500) with workaround

Post by gyzod »

Hello,

Since yesterday's build, the user interface crashes on zoneminder 1.37.x. I've traced down the error to apache's error.log, which is :

Code: Select all

[Wed Feb 21 18:02:24.241991 2024] [php:error] [pid 366342] [client 192.168.2.221:60826] PHP Fatal error:  Uncaught Error: Call to a member function CpuLoad() on null in /usr/share/zoneminder/www/skins/classic/includes/functions.php:410\nStack trace:\n#0 /usr/share/zoneminder/www/skins/classic/includes/functions.php(274): getSysLoadHTML()\n#1 /usr/share/zoneminder/www/skins/classic/includes/functions.php(186): getNormalNavBarHTML()\n#2 /usr/share/zoneminder/www/skins/classic/views/console.php(99): getNavBarHTML()\n#3 /usr/share/zoneminder/www/index.php(260): require_once('...')\n#4 {main}\n  thrown in /usr/share/zoneminder/www/skins/classic/includes/functions.php on line 410
[Wed Feb 21 18:02:39.589255 2024] [php:error] [pid 366398] [client 192.168.2.215:52296] PHP Fatal error:  Uncaught Error: Call to a member function CpuUsagePercent() on null in /usr/share/zoneminder/www/skins/classic/includes/functions.php:396\nStack trace:\n#0 /usr/share/zoneminder/www/skins/classic/includes/functions.php(275): getCpuUsageHTML()\n#1 /usr/share/zoneminder/www/skins/classic/includes/functions.php(186): getNormalNavBarHTML()\n#2 /usr/share/zoneminder/www/skins/classic/views/console.php(99): getNavBarHTML()\n#3 /usr/share/zoneminder/www/index.php(260): require_once('...')\n#4 {main}\n  thrown in /usr/share/zoneminder/www/skins/classic/includes/functions.php on line 396
By commenting these 2 lines, the user interface works fine !

OS : Ubuntu 22.04

Pat
Attachments
bug_zm137.png
bug_zm137.png (128.13 KiB) Viewed 6807 times
User avatar
borozenetsww
Posts: 42
Joined: Tue Sep 12, 2023 1:55 am

Re: User interface crashes (HTTP 500) with workaround

Post by borozenetsww »

Confirmed. ZM stop work at 1.37.51~20240221142147-jammy.
User avatar
borozenetsww
Posts: 42
Joined: Tue Sep 12, 2023 1:55 am

Re: User interface crashes (HTTP 500) with workaround

Post by borozenetsww »

/usr/share/zoneminder/www/skins/classic/includes/functions.php

Comment two lines for work.

// $result .= ' '.translate('Cpu').': '.number_format($thisServer->CpuUsagePercent(), 1, '.', '').'%'.PHP_EOL;
// $result .= ' '.translate('Load').': '.number_format($thisServer->CpuLoad(), 2, '.', '').PHP_EOL;

Now not show system load, but ZM work.
dougmccrary
Posts: 1319
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: User interface crashes (HTTP 500) with workaround

Post by dougmccrary »

I get 1.36.12 - is this right, at the end of policy?
1.37.45~20230921.14-jammy 500
500 http://zmrepo.zoneminder.com/debian/master jammy/ Packages
*** 1.36.12+dfsg1-1ubuntu0.1~esm1 510
510 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security/main amd64 Packages
100 /var/lib/dpkg/status
1.36.12+dfsg1-1 500
500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
User avatar
borozenetsww
Posts: 42
Joined: Tue Sep 12, 2023 1:55 am

Re: User interface crashes (HTTP 500) with workaround

Post by borozenetsww »

dougmccrary wrote: Thu Feb 22, 2024 5:12 am I get 1.36.12 - is this right, at the end of policy?
1.37.45~20230921.14-jammy 500
500 http://zmrepo.zoneminder.com/debian/master jammy/ Packages
*** 1.36.12+dfsg1-1ubuntu0.1~esm1 510
510 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security/main amd64 Packages
100 /var/lib/dpkg/status
1.36.12+dfsg1-1 500
500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
1.36.33
https://launchpad.net/~iconnor/+archive ... lter=jammy
dougmccrary
Posts: 1319
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: User interface crashes (HTTP 500) with workaround

Post by dougmccrary »

Thanks, but 1.37.xx is what I'm after.
I did manage to get the current .51, it's running, but the UI is majorly missing. Gotta be something simple...
The buttons across the top work, the console looks like
Screenshot 2024-02-22 at 00-50-36 Screenshot.png
Screenshot 2024-02-22 at 00-50-36 Screenshot.png (75.11 KiB) Viewed 6758 times
User avatar
borozenetsww
Posts: 42
Joined: Tue Sep 12, 2023 1:55 am

Re: User interface crashes (HTTP 500) with workaround

Post by borozenetsww »

dougmccrary wrote: Thu Feb 22, 2024 8:34 am Thanks, but 1.37.xx is what I'm after.
I did manage to get the current .51, it's running, but the UI is majorly missing. Gotta be something simple...
The buttons across the top work, the console looks like
Screenshot 2024-02-22 at 00-50-36 Screenshot.png

edit - seems the www directory is empty. Anyone know how to re-populate it? install --reinstall zoneminder didn't do it.
Solution is above. Comment two lines. This is error in last build. I hope after update this error will be fixed.
dougmccrary
Posts: 1319
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: User interface crashes (HTTP 500) with workaround

Post by dougmccrary »

Thank you sir!
I'd overlooked the intended fix wasn't ...
Post Reply