Class 'IntlDateFormatter' not found

#1
Hi there,

I am using OpenLiteSpeed 1.7.16.
Server runs CentOS Linux release 7.9.2009 (Core)
php -v gives me:
PHP 7.4.33 (cli) (built: Dec 19 2022 13:32:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

LSWS is using LiteSpeed SAPI lsPHP74

I am converting date functions in an excisting website, and get the following errors.

The new code I use is:
<?php
echo (new IntlDateFormatter('nl_NL',IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM,new DateTimeZone('Europe/Amsterdam')))->format(new DateTime()) . "\n";
?>

and my output is:
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /usr/local/lsws/koepelkoninkjes/html/api/test.php:4 Stack trace: #0 {main} thrown in /usr/local/lsws/koepelkoninkjes/html/api/test.php on line 4

I have looked up several pages with info, but they do not give the solution for LSWS / CENTOS 7.

Anyone can help out ?

Erik
 
Top