简体   繁体   中英

extension=php_intl.dll in my linux centos doesn't exists

I have a problem, I just want to uncomment extension=php_intl.dll in my php.ini file but that extension doesn't exist, I'm using Centos with Nginx configuration.

这是我的截图

Linux servers don't use .dll files. You need a .so instead.

To install php_intl on CentOS , you should enable remi repo . Open the terminal and run the following commands:

wget https://rhel7.iuscommunity.org/ius-release.rpm

sudo rpm -Uvh ius-release*.rpm

Update your system then install the php-intl:

sudo yum update sudo yum --enablerepo=remi install php-intl

To permanently enable remi repo , open the terminal and run the following command:

sudo nano /etc/yum.repos.d/remi.repo Set enabled=1.

How did you install PHP ?

PHP 5.6.3 is terribly old, and affected by tons of security issues, latest version is 5.6.40 but have reached its end of life a few months ago

If installed from sources, you have to rebuild it, location of php command usually gives useful information (ex, when installed in /usr/local)

which php

or remove this build from sources, and switch to RPM provided binaries.

If installed from a 3rd party repository, you should find the intl extension in the same repository.

see information provided by the yum command

yum info php-cli

While I heartily recommends to upgrade to a supported version (7.1+), if you want to keep 5.6, " remi " is the only repository which still provides this version (with security backports ).

To upgrade your installation (to latest 5.6.40 or any other version, 7.0, 7.1, 7.2, 7.3), simply follow the wizard instructions .

With RPM, you never have to change php.ini to enable installed extension, each package provides its own configuration file (ex: /etc/php.d/20-intl.ini ) which enable it.

With proper provider, for any needed extension (ex xxx), a simple

yum install php-xxx

will install the package with this extension (package name may be different, as some packages provide various extensions).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM