I am having trouble installing CakePHP on my Mac - php

I currently have XAMPP 5.6.8 and MAMP 3.2.1 installed on my computer. I also have Composer installed globally on my Mac. I tried all the suggestions in CakePHP but I am not able to install it. I looked all over this forum and none of the suggestions have worked for me. This is the error I get when I type in the commands into the terminal.
Carloss-Mac-mini:~ Carlos_Zetroc$ composer create-project --prefer-dist cakephp/app [CakePHP]
Installing cakephp/app (3.0.2)
- Installing cakephp/app (3.0.2)
Loading from cache
Created project in [CakePHP]
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- 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.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.1.x-dev, 3.0.x-dev].
If anybody can help me out I'd greatly appreciate it.

You have to install and enable ext-intl on your system before installing cakePhp.
You will get the instruction here

Check http://book.cakephp.org/3.0/en/installation.html#requirements
In XAMPP, intl extension is included but you have to uncomment extension=php_intl.dll in php.ini and restart the server through the XAMPP Control Panel.

The OSX answer to this is to go to "php-osx.liip.ch" and run this command for PHP 5.6 (Current stable) in your command line interface (CLI):
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
After that is complete, establish the path to your PHP binary. You could use anything you want, but I used vim. Here is the command at the CLI:
"vim ~/.bash_profile"
This will lead you to a CLI text editor. I am told that some people may not have a "usr" directory, if not, feel free to make one. Please go elsewhere to see how to do this.
In the meanwhile, after you have executed "vim ~/.bash_profile", and inside the editor, feel free to press "i" for insert, and then type your path. The line is "export PATH="/usr/local/php5/bin:$PATH". When you are done that, press escape and then ":wq" the ":" stand for "I wanna enter a command", and "wq" stands for "write and quit". When it is done, you will be returned to the command line.
You then enable you path by typing "source ~/.bash_profile". This will enable your new path. Close the CLI and restart it (if needed). Your new path will be "/usr/local/php5/bin/php". You can ascertain this if you type "which php" at the CLI.
This will now change the PHP universal from the default PHP that came with your Mac to the one you then specified. After which, feel free to bake with composer!

Related

Trouble Installing CakePHP on XAMPP Mac

So I've been trying to install Cake on a Mac laptop running Xampp. So far I have been unsuccessful. When I try to create a project, it just returns this->
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cakephp/cakephp 3.2.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.2.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.2.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.2.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.2.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for cakephp/cakephp ~3.2 -> satisfiable by cakephp/cakephp[3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4].
I have installed icu4c and it says intl is installed on phpinfo.php, but this error message keeps showing up. I have been working on this for about 4 hours.
i installed cakePHP3 on osx by following the instructions:
open php.ini file in xmapp, the file should be located in "xampp->etc" folder. Edit this file, first find ";extension=php_intl.dll" line and change it to "extension=php_intl.dll" remove ';'. Hope this will help.
let me know what error you are getting if installtion is failing.

CakePHP 3.1.1 Install Error

I installed Composer for windows file.exe and tried to install cakePHP 3.1.1 just now for the first time, but got the below error. Files[CakePHP311] created in that folder and also have XAMPP[PHP version 5.6.8] + Windows 10 Pro.
What is this error and cakePHP files needed re-setup?
User#cccc/C/xampp/htdocs/cakePHP_Blog
$ composer create-project --prefer-dist cakephp/app cakePHPblog
Installing cakephp/app (3.1.1)
- Installing cakephp/app (3.1.1)
Downloading: 100%
Created project in cakePHPblog
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem
- cakephp/cakephp 3.1.x-dev requires ext-intl * -> the requested PHP extensi on intl is missing from your system.
- cakephp/cakephp 3.1.0-beta2 requires ext-intl * -> the requested PHP exten sion intl is missing from your system.
- cakephp/cakephp 3.1.0-beta requires ext-intl * -> the requested PHP extens ion intl is missing from your system.
- cakephp/cakephp 3.1.0-RC1 requires ext-intl * -> the requested PHP extensi on intl is missing from your system.
- cakephp/cakephp 3.1.0 requires ext-intl * -> the requested PHP extension i ntl is missing from your system.
- Installation request for cakephp/cakephp ~3.1 -> satisfiable by cakephp/ca kephp[3.1.0, 3.1.0-RC1, 3.1.0-beta, 3.1.0-beta2, 3.1.x-dev].
This error occurred from php-intl plugin missing.
If you use Linux, you can try apt-get install php5-intl or yum install php-intl command.
Make sure the extension php_intl is installed and enabled. It comes bundled with the XAMPP installation but may not be enabled. You can enable it by checking for the following line in your php.ini (located at /xampp/php/php.ini) which may be commented out and removing the comment:
;extension=php_intl.dll
TO (remove the semicolon)
extension=php_intl.dll
You will then need to restart Apache from the Xampp Control Panel.

OSX 10.10 PHP Composer not finding required extensions intl and mcrypt

I am attempting to create a cake PHP application on OSX 10.10 using the following command:
php /usr/local/bin/composer.phar create-project --prefer-dist cakephp/app testapp
When I do I am getting the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- 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.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.1.x-dev, 3.0.x-dev].
I have installed the intl extension via pear/pecl but still continue to get this error.
Please someone restore my faith in PHP.
You might have to run php5enmod intl to activate the PHP5 module.
Otherwise, check if you have installed intl to the right PHP installation on OS X: there is a standard OS X one, but if you have installed a PHP version beside the OS X version, check if you have the right PHP in your $PATH variable.

requires ext-intl * php

I am using UBUNTU 14.04 and with xampp installed.
however, I am having issue download package from
https://github.com/giggsey/libphonenumber-for-php. I have got the composer installed as well.
created composer.json file
When I run php composer.phar install I received following error
Problem 1
- giggsey/libphonenumber-for-php 6.2.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- giggsey/libphonenumber-for-php 6.2.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- giggsey/libphonenumber-for-php 6.2.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- giggsey/libphonenumber-for-php 6.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- giggsey/libphonenumber-for-php 6.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- giggsey/libphonenumber-for-php 6.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- giggsey/libphonenumber-for-php 6.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for giggsey/libphonenumber-for-php ~6.0 -> satisfiable by giggsey/libphonenumber-for-php[6.0, 6.1, 6.1.1, 6.2, 6.2.0.1, 6.2.1, 6.2.2].
You can install the intl extension via apt-get:
sudo apt-get install php5-intl
Restart your server after the installation completes:
sudo service apache2 restart

Can't install mongodb doctrine in symfony2 with composer

I've followed the official documentation
when I run composer update I have this error :
Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/mongodb 1.0.4 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.3 requires ext-mongo >=1.2.12,<1.5-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.2 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.1 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.0 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb-odm 1.0.0-BETA9 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4].
- Installation request for doctrine/mongodb-odm 1.0.0-BETA9 -> satisfiable by doctrine/mongodb-odm[1.0.0-BETA9].
When I run php -m I can't find mongo extension , but the server is running and I can use Mongo in PHP, does anyone know what should the problem be ?
I doubt that the doctrine can't find the mongo extension..
thanks !
I fixed it !
As expected, it was because of the extension so here are the steps to take if you face the same problem as me : the requested PHP extension mongo is missing from your system.
run the command : php --ini, you will see all the configuration files parsed! For me , I am using PHP-fpm , I thought the only php.ini file needed was inside fpm folder, but I was wrong there was a php.ini file inside CLI folder and it's this folder that tells the server which modules are loaded , and it's exactly the same file that doctrine reads the extensions from.
Open CLI/php.ini and add this line in the end extension=mongo.so.
Restart PHP : service php5-fpm restart
That's it!
for OSX:
brew install php56-mongo
if it errors out: read the error message carefully and follow it to rerun the command.
source:
http://php.net/manual/en/mongo.installation.php#mongo.installation.osx
Linux
To install PHP's MongoDB extension, run:
sudo apt-get install php-mongo
See also: Easiest way to install Mongodb PHP extension in Ubuntu 13.10 (saucy)?

Categories