【发布时间】:2017-03-05 14:17:28
【问题描述】:
我将我的服务器更新到 PHP7,现在 CakePHP 给出了这个错误:
Fatal error: You must enable the intl extension to use CakePHP. in /var/www/clients/client1/web1/web/ID/config/bootstrap.php on line 38
我安装了apt-get install -y php7.0-intl
翻遍了整个互联网,我将/etc/php/7.0/cli/php.ini更新为
[intl]
;intl.default_locale =
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
intl.error_level = 0
intl.use_exceptions = 0
我确定它是在 ini 中加载的
/etc/php/7.0/cli/conf.d/20-intl.ini,
但是还是不行。
【问题讨论】:
-
你试过 php -m 了吗?
-
您在进行这些更改后是否重新启动了 Apache?
-
/etc/php/7.0/cli/conf.d/20-intl.ini,是php -m的输出。我什至重新启动。
-
确定是Apache下PHP使用的ini文件吗?刚刚注意到它的路径中有“cli”,这可能表明命令行中的 PHP 使用的 ini 文件与 Web 服务器中的 PHP 不同。
-
确实,这就是问题所在。感谢您发现这一点!
标签: cakephp-3.0 php-7 intl