简体   繁体   English

作曲家使用的是其他版本的PHP

[英]Composer is using a different version of php

So apparently I have 2 versions of Php installed. 因此,显然我安装了2个版本的Php。 I have 5.6 and 7. I use Xampp on Mac and it works on 5.6, I tried downloading composer and it refuses to install cakephp bwith this error 我有5.6和7。我在Mac上使用Xampp,它在5.6上有效,我尝试下载composer,但它拒绝安装cakephp b并出现此错误

- cakephp/cakephp 3.4.9 requires ext-intl * -> the requested PHP extension intl is missing from your system.

and down at the end of the message it says 在消息末尾说

o enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/7.0/php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

so it runs on php 7 that doesn't even work in the first place. 因此它可以在php 7上运行,而该php甚至在一开始都不起作用。 I did try to remove the semi-colon from php.ini nothing worked thanks 我确实尝试从php.ini中删除分号,但没有用,谢谢

As indicated the cakePHP framework requires the internationalization extension (ext-intl). 如所示,cakePHP框架需要国际化扩展(ext-intl)。 As a best practice (and to save you time down the line), I recommend spinning up a virtual machine or containers that are the same platform that your server will be (windows,linux,unix,osx). 作为最佳实践(为了节省您的时间),我建议旋转与您的服务器相同的虚拟机或容器(windows,linux,unix,osx)。 This way you're development env and production environments are the same. 这样,您在开发环境和生产环境上是相同的。

As for how to enable the ext-intl: 至于如何启用ext-intl:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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