Cake PHP 3.0.*-dev error? - cakephp

[root#skadi:/var/www/mailinglist]$ composer.phar install
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
- Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- cakephp/cakephp 3.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
Problem 2
- cakephp/cakephp 3.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- cakephp/debug_kit 3.0.x-dev requires cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- Installation request for cakephp/debug_kit 3.0.*-dev -> satisfiable by cakephp/debug_kit[3.0.x-dev].

Try this
sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
on Ubuntu 13.10 and later there is a problem for migration of php modules configuration from /etc/php5/conf.d to /etc/php5/mods-available
If you don't solve verify the mcrypt library
updatedb
locate mcrypt.so
locate mcrypt.ini

Just for the record, as I didn't find a solution anywhere for Arch Linux: If you happen to use composer from the extra repository (extra/php-composer), it's actually not enough to enable the mcrypt extension in /etc/php/php.ini because the global composer script uses its own ini-file (/usr/share/php-composer/php.ini).
To fix the mcrypt error, you can either:
Enable mcrypt extension globally and run composer using php /usr/bin/composer.
Add mcrypt extension to /usr/share/php-composer/php.ini and prevent pacman from overwriting your changes by adding NoUpgrade = usr/share/php-composer/php.ini to /etc/pacman/pacman.conf.

I had this problem when I tried to install laravel with composer on my MAC Yosemite.
This was the error message I got from the terminal:
laravel/framework v5.0.16 requires ext-mcrypt * -> the requested PHP
extension mcrypt is missing from your system.
I followed these instructions to install mcrypt on my MAC:
http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/
And that fixed the problem

Composer was blocking my install of cakephp because of a dependency on mcrypt, despite the fact that mcrypt was installed and working in my php configuration.
I finally realized that Composer was checking the cli mode of php, and I resolved the dependency by simply copying mcrypt.ini from /etc/php5/conf.d to /etc/php5/cli/conf.d.

Related

Undefined subroutine &main::open_quote called at /usr/local/bin/autom4te line 262

Hi I try to install xdebug via pecl on macox (Big Sur 11.5.2)
But I get error message
xdebug volodymyr$ pecl install xdebug
downloading xdebug-3.0.4.tgz ...
Starting to download xdebug-3.0.4.tgz (215,870 bytes)
.............................................done: 215,870 bytes
87 source files, building
running: phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
Undefined subroutine &main::open_quote called at /usr/local/bin/autom4te line 262.
ERROR: `phpize' failed
I update perl but it did help me (I can't catch if the open_quote is a part of perl)
Also I didn't find any information in the internet that is related with open_quote function issue
I tried to install xdebug from source and get the same bug on the ./phpize step
Resolve:
Just reinstall autoconf automake libtool
I run
brew reinstall autoconf automake libtool
After that I run brew link --force autoconf and it resolved the trouble
The error here comes from autom4te, not pecl or ./phpize. You need to update automake and autoconf, and/or related packages.

Installing CakePHP gives an error about intl missing, but it's installed

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 ...

Cake PHP installation issue [duplicate]

This question already has answers here:
CakePHP 3.0 installation: intl extension missing from system
(17 answers)
Closed 5 years ago.
I have installed cakephp using composer.
But while running it showing the following error.
Warning: require(D:\xampp\htdocs\my_app_name/vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\my_app_name\webroot\index.php on line 27
Fatal error: require(): Failed opening required 'D:\xampp\htdocs\my_app_name/vendor/autoload.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs\my_app_name\webroot\index.php on line 27
Could you please help me ?
Lenovo-User#Lenovo MINGW64 /d/xampp/htdocs
$ composer self-update
You are already using composer version 1.4.2 (stable channel).
Lenovo-User#Lenovo MINGW64 /d/xampp/htdocs
$ composer create-project --prefer-dist cakephp/app mylogin
Installing cakephp/app (3.4.2)
- Installing cakephp/app (3.4.2): Loading from cache
Created project in mylogin
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.4.9 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.8 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.7 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.6 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.5 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.4 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.3 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
- cakephp/cakephp 3.4.2 requires lib-icu >=4.8 -> the requested linked libra
ry icu has the wrong version installed or is missing from your system, make sure
to have the extension providing it.
- cakephp/cakephp 3.4.1 requires lib-icu >=4.8 -> the requested linked libra
ry icu has the wrong version installed or is missing from your system, make sure
to have the extension providing it.
- cakephp/cakephp 3.4.0 requires lib-icu >=4.8 -> the requested linked libra
ry icu has the wrong version installed or is missing from your system, make sure
to have the extension providing it.
- Installation request for cakephp/cakephp 3.4.* -> satisfiable by cakephp/c
akephp[3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9].
To enable extensions, verify that they are enabled in your .ini files:
- D:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PH
P in CLI mode.
Lenovo-User#Lenovo MINGW64 /d/xampp/htdocs
$
Thanks,
Run following command first (you might need to prepend this with sudo if composer was installed globally)
composer self-update
then again
composer create-project --prefer-dist cakephp/app my_app_name

Installing cakedc/users on CakePHP 3.1 version conflict

I'm trying to install Cake dc users on a Cakephp 3.1
That's a part of my composer.json that I'm almost sure that is properly setup mantain the cake version to 3.1:
"require": {
"php": ">=5.4.16",
"cakephp/cakephp": "~3.1",
I used the following command to setup cake:
composer create-project cakephp/app ar2016-2 3.1.*
and that's the result I get when I try to install DCUsers with the composer:
composer require cakedc/users:~3.1.0
./composer.json has been updated
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
- Conclusion: remove cakephp/cakephp 3.2.1
- Conclusion: don't install cakephp/cakephp 3.2.1
- cakedc/users 3.1.0 requires cakephp/cakephp ~3.1.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.0-RC1, 3.1.0-beta, 3.1.0-beta2, 3.1.1, 3.1.10, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9].
...
It looks that it detects CakePHP 3.2.1 but everywhere I check show me that I'm using the proper 3.1. version. Any Idea?
Thanks in advance,
David
I'd doubt that it shows that you've installed 3.1 anywhere at all, because the latest release is 3.2.1 and, ~3.1 means >= 3.1 and < 4.0.0, and therefore I'm pretty sure that you have the latest version installed, ie 3.2.1, a quick bin/cake will probably confirm that.
https://getcomposer.org/doc/articles/versions.md#tilde
The cakedc/users version that you have requested, requires cakephp/cakephp:3.1.*, which means >= 3.1 and < 3.2, hence the error.
https://getcomposer.org/doc/articles/versions.md#wildcard
So either use the master branch of the plugin (it requires cakephp/cakephp:~3.1) until a proper release is issued, or use a more specific version constraint for the CakePHP framework, like 3.1.*
Thanks for the answer but it's just fixed, it was a problem of the plugin itself and cakedc fixed.

Am trying to download cakephp and getting missing extension message

Am trying to download cakephp using the following code frome the terminal - php composer.phar create-project --prefer-dist cakephp/app bookmarker
but it tells me am missing some extensions in my system -
Problem 1
- cakephp/cakephp 3.2.x-dev 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-RC1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Any suggestions please.
- 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.0-RC1, 3.2.1, 3.2.x-dev].
You have to enable intl extension from php.ini
if you use xampp see this
Otherwise find php.ini
search intl.dll
remove semiclone infront of it (for xampp)
remove # (for wampp)
Save it and restart server
After this process try to download again
I run into the same problem while installing CakePHP for a new project. What I did was the following:
1) Upgrade the PHP to 5.6 (http://coolestguidesontheplanet.com/upgrade-php-on-osx) and check my phpinfo() file for intl to be enabled. As it was enabled I thought that the default Mac OS PHP in use was not the one I was checking in phpinfo(). Indeed when prompting on the terminal php -v or which php I realised the CLI was using PHP 5.5.3 so I modified my ~/.profile and ~/.bash_profile...
2)vim ~/.profile
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH
PATH=/usr/local/php5/bin:$PATH
3) source ~/.profile
4) vim ~/.bash_profile
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PATH=/usr/local/php5/bin:$PATH
5) Close and reopen the terminal.
6) Check again php -v or which php and PHP 5.6 appeared.
7) Run again php composer.phar create-project --prefer-dist cakephp/app app_name and the error was gone.
It turns out that some months ago I had installed homebrew and with it another PHP version got installed as the default Mac OS PHP with no intl enabled.

Resources