简体   繁体   中英

Composer is using a different version of php

So apparently I have 2 versions of Php installed. 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

- 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. I did try to remove the semi-colon from php.ini nothing worked thanks

As indicated the cakePHP framework requires the internationalization extension (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). This way you're development env and production environments are the same.

As for how to enable the ext-intl:

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