0

When I try to install CakePHP, I get an error that intl is missing:

$ composer self-update && composer create-project --prefer-dist cakephp/app blog

You are already using composer version 1.5.2 (stable channel).
Installing cakephp/app (3.5.0)
  - Installing cakephp/app (3.5.0): Loading from cache
Created project in blog
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - cakephp/cakephp 3.5.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.5.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.5.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.5.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.5.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.5.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - Installation request for cakephp/cakephp 3.5.* -> satisfiable by cakephp/cakephp[3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5].

When I try to install php56-intl, I get a message that it's already installed:

$ brew install php56-intl
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/php).
==> New Formulae
bchunk                                   dps8m                                    e2tools                                  heartbeat                                kaitai-struct-compiler                   simg2img
==> Updated Formulae
abcmidi                    debianutils                getdns                     homebrew/php/php55-molten  inspircd                   mdds                       ompl                       scalaenv                   terragrunt
asciidoc                   dssim                      geth                       homebrew/php/php56-molten  itstool                    mikutter                   ortp                       scalastyle                 tintin
bazel                      erlang                     gofabric8                  homebrew/php/php70-molten  kerl                       mupdf                      pandoc                     scm-manager                vapoursynth
bit                        exploitdb                  grafana                    homebrew/php/php71-molten  libgsf                     mupdf-tools                poco                       sjk                        wireguard-tools
cmake                      faas-cli                   grakn                      i2p                        libmaxminddb               mypy                       poppler                    sourcekitten               yara
convox                     firebase-cli               gsmartcontrol              imagemagick                libpqxx                    nativefier                 prometheus                 swiftformat
cppad                      gegl                       homebrew/php/php54-molten  imagemagick@6              libuv                      node-build                 resty                      swiftlint
==> Renamed Formulae
newsbeuter -> newsboat

Warning: homebrew/php/php56-intl 5.6.32_10 is already installed

Why is this happening? What can I do to fix it?

Edit: I'm on Mac OS X. Running which php returns PHP 5.6.28 ...

Don P
  • 60,113
  • 114
  • 300
  • 432
  • The PHP version used by composer is probably not the same as the one you're trying to install the extension for. – ndm Nov 13 '17 at 18:14
  • So I haven't used PHP in a few years, why does composer require a particular version of PHP - isn't it just downloading dependencies? Also how do I check the version PHP needed by Composer? When I do `php -v` I get 5.6.28. – Don P Nov 13 '17 at 18:17
  • how about phpinfo()?? It may be enable but can be disabled in interpreter you are using . – Antoniossss Nov 13 '17 at 18:24
  • make sure that your `composer` is using `php56-intl` as well. – Antoniossss Nov 13 '17 at 18:25
  • @Antoniossss - what about phpinfo? It says I'm using PHP version 5.6.28. Same question as above, how do I check what version of PHP composer is using? – Don P Nov 13 '17 at 18:26
  • Just theck the script. composer.sh or bat is nothing more then `php -phar pathtocomposer` m ore or less – Antoniossss Nov 13 '17 at 18:28
  • @Antoniossss - composer is a compiled file. There's nothing in it about the version of PHP it uses. – Don P Nov 13 '17 at 18:35
  • @DonP composer is a php script like everything else in php. Just check executabl composer file. Obviously it uses php without intln – Antoniossss Nov 13 '17 at 18:36
  • I mean there's 6 lines of PHP and the rest is a binary. In the 6 lines, there is nothing about the PHP version. Is there a particular line or part of the code you see that shows the PHP version it's using? – Don P Nov 13 '17 at 18:39
  • ye and what those 6 lines says ..... – Antoniossss Nov 13 '17 at 18:49
  • 3
    Possible duplicate of [Installing with Composer - php extensions: ext-mcrypt \* and ext-intl \* missing from your system on XAMPP](https://stackoverflow.com/questions/31797493/installing-with-composer-php-extensions-ext-mcrypt-and-ext-intl-missing-f) – drmonkeyninja Nov 14 '17 at 09:38

0 Answers0