upgrade to 1.36.20 - now receiving an error trying to go to ZM site
upgrade to 1.36.20 - now receiving an error trying to go to ZM site
good afternoon,
just installed 1.36.20 (armhf version) on xenial. Receiving the below error trying to go to ZM site:
1.36.19 was running fine.
Any idea to solve the issue?
Downgraded to 1.36.19 and running again fine.
thanks
just installed 1.36.20 (armhf version) on xenial. Receiving the below error trying to go to ZM site:
1.36.19 was running fine.
Any idea to solve the issue?
Downgraded to 1.36.19 and running again fine.
thanks
Last edited by pat2 on Sat Jul 16, 2022 7:47 am, edited 5 times in total.
---------------------------------------------------------------------------
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: Issue after 1.36.20 install
hi Isaac,
could you suggest me what could be the issue? The strange is that the previous versions are working fine.
The above error is only with 1.36.20. Downgrading to 1.36.19 is working fine.
Is there a way to understand/debug the configuration error?
I suspect it could be related to
- Remove dependency on php-apc
- Add php-intl as a dependency
thanks for your support
could you suggest me what could be the issue? The strange is that the previous versions are working fine.
The above error is only with 1.36.20. Downgrading to 1.36.19 is working fine.
Is there a way to understand/debug the configuration error?
I suspect it could be related to
- Remove dependency on php-apc
- Add php-intl as a dependency
thanks for your support
---------------------------------------------------------------------------
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
Thanks, Ralphred.
You are right. I found the error:
tail -200 /var/log/apache2/error.log
[Sat Jul 16 12:40:48.479707 2022] [core:notice] [pid 925:tid 3069239296] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jul 16 12:42:53.869603 2022] [proxy_fcgi:error] [pid 938:tid 2509239344] [client 192.168.1.1:64898] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /usr/share/zoneminder/www/includes/config.php:142\nStack trace:\n#0 /usr/share/zoneminder/www/index.php(46): require_once()\n#1 {main}\n thrown in /usr/share/zoneminder/www/includes/config.php on line 142'
it seems a class (probably new) IntlDateFormatter used by config.php is not found:
it seems an issue of not perfect installation for my platform armhf/xenial. It should be only for this platform since none claimed for such issue.
thanks
EDIT: edited config.php and IntlDateFormatter is called:
global $dateFormatter;
global $dateTimeFormatter;
global $timeFormatter;
$dateFormatter = new IntlDateFormatter(null, IntlDateFormatter::SHORT, IntlDateFormatter::NONE);
$dateTimeFormatter = new IntlDateFormatter(null, IntlDateFormatter::SHORT, IntlDateFormatter::LONG);
$timeFormatter = new IntlDateFormatter(null, IntlDateFormatter::NONE, IntlDateFormatter::LONG);
probably not able to find the library where it is defined.
I'm not an expert, probably Isaac could help.
It's not a great issue since 1.36.19 is running fine.
thanks
You are right. I found the error:
tail -200 /var/log/apache2/error.log
[Sat Jul 16 12:40:48.479707 2022] [core:notice] [pid 925:tid 3069239296] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jul 16 12:42:53.869603 2022] [proxy_fcgi:error] [pid 938:tid 2509239344] [client 192.168.1.1:64898] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /usr/share/zoneminder/www/includes/config.php:142\nStack trace:\n#0 /usr/share/zoneminder/www/index.php(46): require_once()\n#1 {main}\n thrown in /usr/share/zoneminder/www/includes/config.php on line 142'
it seems a class (probably new) IntlDateFormatter used by config.php is not found:
it seems an issue of not perfect installation for my platform armhf/xenial. It should be only for this platform since none claimed for such issue.
thanks
EDIT: edited config.php and IntlDateFormatter is called:
global $dateFormatter;
global $dateTimeFormatter;
global $timeFormatter;
$dateFormatter = new IntlDateFormatter(null, IntlDateFormatter::SHORT, IntlDateFormatter::NONE);
$dateTimeFormatter = new IntlDateFormatter(null, IntlDateFormatter::SHORT, IntlDateFormatter::LONG);
$timeFormatter = new IntlDateFormatter(null, IntlDateFormatter::NONE, IntlDateFormatter::LONG);
probably not able to find the library where it is defined.
I'm not an expert, probably Isaac could help.
It's not a great issue since 1.36.19 is running fine.
thanks
---------------------------------------------------------------------------
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
You are right about php-intl. Need to make sure it’s installed and in use.
-
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
This is being widely reported, would it be useful if someone who knows what they are doing gave a few guidelines on installation and use of php-intl?
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
So, there are instructions about enabling php-intl floating around all over the web, and depending on your XP level you may or may not want to find one tailored to your system, but you basically need `extension=intl` to be set, and the module to be installed.
For me, I know my system has multiple php.ini files, but apache only uses the ones associated with apache, and my goldfish brain couldn't remember where they are, so I locate the files and grep for the setting:
Code: Select all
holly ~ # locate php.ini| xargs grep -n "=intl"
/etc/php/apache2-php7.4/php.ini:921:;extension=intl
/etc/php/apache2-php8.0/php.ini:930:;extension=intl
/etc/php/apache2-php8.1/php.ini:925:;extension=intl
... snip ...
After restarting apache it was still throwing errors, and if I wasn't using gentoo I'd just check my package manager software and install the php-intl package*, restart apache again and it'd be solved.
*Because this is pat2's thread, I checked, and the php-intl package does exist for xenial (in the universe repo, is that the right nomenclature?), but I can't find any arm repos at all, so YMMV, but looking at the .deb, I think you just need the config change.
Now I jumped through my gentoo hoops and this particular issue won't come up again because I'm maintaining my own ebuild (package) and the dependency on this php module is now hard coded.
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
Thanks for that, and thats exactly what I did, however after restarting apache I still got a 500 error.. The log file is not that illuminating
I wonder if I have to tweak the config.php file, but that looks & feels wrong
Thanks for your help and advice
Code: Select all
[Sat Jul 16 17:05:28.213455 2022] [php7:error] [pid 227322] [client 192.168.0.7:38890] PHP Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /usr/share/zoneminder/www/includes/config.php:142\nStack trace:\n#0 /usr/share/zoneminder/www/index.php(46): require_once()\n#1 {main}\n thrown in /usr/share/zoneminder/www/includes/config.php on line 142
Thanks for your help and advice
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
Yeah, it's basically registering functions that are used all over the code, if you took out those definitions you'd just get errors everywhere they are used instead.
So what distro/os are you using?
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
Using Ubuntu 20.04 LTS which has been bulletproof Maybe I should upgrade to 22.04...do you think that would fix it
Also using php7.4 and Apache2 If that helps diagnosis
Cheers
Also using php7.4 and Apache2 If that helps diagnosis
Cheers
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
Maybe, but it's bit extreme!do you think that would fix it
So I installed ubuntu 20.04 and put 1.36.20 on it. It works out the box and intl is loaded by default, but by /etc/php/7.4/apache2/conf.d/20-intl.ini and not /etc/php/7.4/apache2/php.ini.
If I disable intl in both, I get your error (as expected).
I'd do a reinstall of php7.4-intl
Code: Select all
apt reinstall php7.4-intl
Code: Select all
sudo grep "=intl" /etc/php/* -R 2>/dev/null
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
thanks. I'm on xenial/armhf with php 7.4 by Ondrej.
I see zoneminder tries to install php-intl of php 7.0...
---------------------------------------------------------------------------
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
I think this might be the root cause of your issue, Ondrej's php PPA doesn't have any xenial packages in it on checking today, only >=18.04.
That said there are php7.x packages in the standard xenial repos.
Do you know why you are using this `out of tree` php build? If it's because is was ahead of the curve in the past, it may just be time to use ubuntu's own php7.4 packages for 16.04 now they exist.
For both you and egglestn, I've tracked down the .so library responsible for making the IntlDateFormatter class available to php in ubuntu:
For me it's /usr/lib/php/20190902/intl.so, but I wouldn't be surprised to see it as /usr/lib/php/[some date]/intl.so depending on php and distro version. If you list the /usr/lib/php/[some date]/ directory contents and there is a lack of other modules in there then you probably have the wrong phpX.X-intl version installed. If you can't find it at all, default to using mlocate to see if it's in the wrong place
Code: Select all
apt install mlocate
updatedb
locate intl.so
Obviously I've posted about finding the correct php.ini file and making sure intl is enabled before, but if there is still some doubt in your mind as to which php.ini is being used by your webserver, make the following myphpinfo.php file
Code: Select all
<?php phpinfo() ?>
The first block of information tells which .ini file(s) was loaded, and if you scroll down far enough you find the "Internationalisation support" section.
If you have a web facing server it's IMPORTANT to remove this file ASAP afterwards (you don't want to publish your attack surface to any passing script kiddy).
*If you are reading this and aren't using ubuntu, just because ubuntu loads intl.so as a module doesn't mean your distro does, I know mine is built in on my production server, yours may be too...
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
Well...Turns out to be a bit simpler than i realised...I apparently had multiple versions of PHP running
The phpinfo showed I was running 7.1 but the intl file was enabled in 7.4 so simply disabling 7.1 and enabling 7.4 seems to have done the trick..
I honestly had no idea what I was doing, but you have helped a huge amount..Thank you so much for your help & patience
Cheers
The phpinfo showed I was running 7.1 but the intl file was enabled in 7.4 so simply disabling 7.1 and enabling 7.4 seems to have done the trick..
I honestly had no idea what I was doing, but you have helped a huge amount..Thank you so much for your help & patience
Cheers
Re: upgrade to 1.36.20 - now receiving an error trying to go to ZM site
You're welcome, I'm used to linux, just not ubuntu or ZM, so it helped me to get some insight into how to poke around inside a .deb package manager, plus VM's are so quick to set-up nowadays it's silly NOT to try and emulate someones issue, plus fixing someones OS issue lets the devs write code instead of troubleshooting