lakshman
lakshman

Reputation: 656

CakePHP Installation on MAC

I am new with MacOS. I have installed MAMP successfully & trying to install CakePHP via terminal in which getting following errors:

  • cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.1.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.9 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.8 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.7 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.6 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.5 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.4 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.3 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-beta3 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-beta2 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-beta1 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-alpha2 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-alpha1 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-RC2 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0-RC1 requires ext-intl * -> the requested PHP extension intl is missing from your system. - cakephp/cakephp 3.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system. - Installation request for cakephp/cakephp ~3.0 -> satisfiable by cakephp/cakephp[3.0.0, 3.0.0-RC1, 3.0.0-RC2, 3.0.0-alpha1, 3.0.0-alpha2, 3.0.0-beta1, 3.0.0-beta2, 3.0.0-beta3, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.1.x-dev, 3.0.x-dev].

Upvotes: 0

Views: 1909

Answers (3)

Guille Venuto
Guille Venuto

Reputation: 21

The best way is Docker.

Create the file docker-compose.yml inside your application with this:

version: "3.1"
services:
  php-fpm:
    image: webdevops/php-nginx:7.4
    container_name: myapp-webserver
    working_dir: /app
    volumes:
      - ./:/app
    environment:
      - WEB_DOCUMENT_ROOT=/app/webroot
    ports:
      - "80:80"

mysql:
    image: mysql:5.6
    container_name: myapp-mysql
    working_dir: /app
    volumes:
      - .:/app
      - ./tmp/data/mysql_db:/var/lib/mysql
    env_file:
      - mysql.env
    command: mysqld --character-set-server=utf8 --init-connect='SET NAMES UTF8;'
    ports:
      - "3306:3306"

Create the file mysql.env

MYSQL_ROOT_PASSWORD=password
MYSQL_DATABASE=my_app
MYSQL_USER=my_user
MYSQL_PASSWORD=password

Execute docker-compose up to start the services and access the app at http://localhost.

The next thing you need to do is update your database configuration with the correct credentials - the host is the service name, in our case it is “mysql”:

'host' => ‘mysql’,
'username' => 'my_user',
'password' => ‘password’,
'database' => 'my_app'

Now you can execute

docker-compose exec php-fpm bin/cake

Upvotes: 0

MammothDevelopper
MammothDevelopper

Reputation: 451

we can use docker instead off mamp or install apache and php.

Specify your project folder as volume of the docker container.

I'm using : docker-apache-php https://github.com/romeOz/docker-apache-php

i'm using an external DB, but we can build a new docker image with this image to add mysql

Upvotes: 1

Ali Asgari
Ali Asgari

Reputation: 840

The error is reporting that the "intl" extension is not enabled or installed on your web server.

It has few steps to fix it on MAMP. Here is explained how to do that.

Upvotes: 1

Related Questions