Fatal error: Class 'IntlDateFormatter' not found
I installed WAMP on my local machine. My PHP version is 5.3.3 in phpinfo()
but that extension doesn't exist! :(
How can I install this extension without compilin开发者_运维技巧g it? Here is just source of it.
The extension was there! All you need to do is clearing the comment(;) before this line in php.ini
file:
Windows:
;extension=php_intl.dll
to
extension=php_intl.dll
Linux:
;extension=intl
to
extension=intl
Then restart apache2 or php-fpm if you are using it.
If it does not work, then you probably need to change it in the php.ini of the CLI version. First check your version with php --version
though, so that you change the right php.ini file, it might be different from your php fpm version.
It also might be enough to just install the package e.g. for php 8.2: sudo apt install php8.2-intl
if you see this on Debian / other Linux platforms.
sudo apt-get install php5-intl
- for PHP 5.6
sudo apt-get install php7.0-intl
- PHP 7+
Amazon Linux
sudo yum install php70-intl
After that restart Apache services.
sudo service apache2 restart
restart apache to get the changes.
in wamp or xampp open php.ini
file and find the below line, then remove comment (;
) at first of it:
;extension=php_intl.dll
if you did not find the line, add it in the php.ini
file:
extension=php_intl.dll
It may be because of Apache. Restart Apache by following command
service httpd restart
and try again.
If you added extension=php_intl.dll
in your php.ini
and it didn't work you can copy icu****.dll
files (about five of them) from PHP folder to Apache /bin
folder then restart Apache and try again.
精彩评论