gpt4 book ai didi

php - 如何在 Ubuntu 14.04 中安装 PHP 国际扩展

转载 作者:IT王子 更新时间:2023-10-29 00:57:39 24 4
gpt4 key购买 nike

我很难找到在 Ubuntu 14.04 中安装 PHP 国际扩展的确切方法。

我尝试使用 sudo apt-get install php5-intl 但显示错误 Unable to locate package

我真的需要 Zend Framework 2 的这个扩展,因为上面缺少扩展我得到这样的错误

错误: Zend\I18n\Validator 组件需要 intl PHP 扩展

我正在使用 PHP 5.5.9。

如何以正确的方式安装 PHP-intl 扩展?

最佳答案

适用于 Ubuntu 14.04 上的 php5

sudo apt-get install php5-intl

适用于 Ubuntu 16.04 上的 php7

sudo apt-get install php7.0-intl

适用于 Ubuntu 18.04 上的 php7.2

sudo apt-get install php7.2-intl

无论如何都要重启你的 apache

sudo service apache2 restart

IMPORTANT NOTE: Keep in mind that your php in your terminal/command line has NOTHING todo with the php used by the apache webserver!

如果已安装扩展程序,您应该尝试启用它。在 php.ini 文件或命令行中。

语法:

php:

phpenmod [mod name]

Apache :

a2enmod [mod name]

关于php - 如何在 Ubuntu 14.04 中安装 PHP 国际扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42243461/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com