codeigniter 4, installation with composer problem - php

I'm new to Codeigniter and i want to ask why when i want to install CI 4 with composer it resulted
Problem 1
- codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2].
But i already uncommend the intl extension on php.ini (I'm using XAMPP)
I already tried to find answers but i can't find it. if you guys have opinion on what's going on please let me know. Thank youu

If you are using php version 5.6 or below
;extension=php_intl.dll Remove semicolon from the line in php.ini file
If php 7 or above
Remove semicolon from the line ;extension=intl in php.ini
Once you updated php.ini restart XAMPP/WAMP

CodeIgniter 4 requires PHP >= 7.2.
The composer.json file of CodeIgniter 4 contains a php>=7.2 require; so you should see the requirements are not satisfy as first problem. But the strange thing is you have extension=php_intl.dll; into your PHP configuration file: from PHP version 7.2 you should have extension=intl. So, please check your PHP version you have into your XAMPP.
Then check that you have C:\xampp\php into your Windows PATH (or the right php directory path in your system).
Try to launch your composer install; if it give the same error, try to create a file test.php into your webroot, containings
<?php phpinfo(); ?>
Open the test.php page on your local web server with the browser and search for Internationalization support. If you do not find this information, it means that extension is not active.
In this case, give a look if you have edit the right PHP.INI. See this question for the right setting of extension with XAMPP.

You could try to run composer with the flag --ignore-platform-reqs to force the instalation, but be aware to solve dependency to run your project.
(I use this flag to install when the server runs on docker with different specifications than host)

Related

Google Cloud App Engine Standard deployment with PHP 7.4 / 8.1 mongodb extension not working

I have already successfully deployed the app in php standard 7.4 environment and its running, today i wanted to update it and when i do gcloud app deploy i get:
Problem 1
- Root composer.json requires PHP extension ext-mongodb * but it is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
- mongodb/mongodb is locked to version 1.4.0 and an update of this package was not requested.
- mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> it is missing from your system. Install or enable PHP's mongodb extension.
So i checked the php.ini file for the deployment, its in the root folder (same level as the yaml file) and contains:
extension=mongodb.so
extension=redis.so
extension=igbinary.so
Did i missed any google cloud update? I am wondering cause it does not complain about the version of the mongodb php extension and just says there is no extension?
I also tried to switch to PHP 8.1 runtime but i got the same error.
"provide" : {
"ext-mongo": "*"
},
i was able to fix it by adding this to my composer.json .. somehow i never needed it until today.
Worked for me adding to composer.json, so ext-mongodb instead of ext-mongo (I cannot comment on the answer of user1334817 )
"provide" : {
"ext-mongodb": "*"
}

Your requirements could not be resolved to an installable set of packages for laravel

I use 5.7v Laravel and 7.2.1v PHP and composer last version, but when I like to create new project these errors appeared:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for league/flysystem 1.0.47 -> satisfiable by league/flysystem[1.0.47].
- league/flysystem 1.0.47 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2
- league/flysystem 1.0.47 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- laravel/framework v5.7.9 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.47]. 0
- Installation request for laravel/framework v5.7.9 -> satisfiable by laravel/framework[v5.7.9].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php-7\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.`
First of all, stop the XAMPP/Wamp and then kindly remove the starting semicolon ( ; ) from your xampp\php\php.ini the following code.
;extension=fileinfo
or in windows with IIS
extension=php_fileinfo.dll
And then restart your XAMPP/Wamp.
NOTE: For Windows, you can find the file in the C:\xampp\php\php.ini-Folder (Windows) or in the etc-Folder (within the xampp-Folder).
The problem seems to be what the error message says - your system is missing fileinfo PHP extension.
Since you're on Windows, open C:\php-7\php.ini file, search for the following line, and remove the beginning ; if exists:
extension=fileinfo
or in windows with IIS
extension=php_fileinfo.dll
Just uncomment extension=fileinfo in php.ini it worked for me even without xampp
In my case I just uncomment extension=fileinfo in php.ini then it works
In my case, I had both installed PHP and XAMPP and in my path, i pointed at C:/php/as the PHP interpreter. In C:/php/php.ini, it was ;extension=fileinfo whereas in C:/xampp/php/php.ini it was extension=fileinfo. I did two changes,
Deleted C:/php/
Changed my path to PHP to point to c:/xampp/php/
The problem is now resolved
Simple soultion, just delete php 7.4.11 folder from C drive.
update php location from C:\php 7.4.11 to C:\xampp\php in path variable under environmental variable
in my case i am using window machine ...my league/flysystem is missing ..
type this command in cmd on project Dir..
composer require league/flysystem
for mine case its work...

how to install mysql drivers for php7 on windows system

How to install MySQL drivers for php 7 on windows system?
Error: - Installation request for pear-pear.php.net/mdb2_driver_mysql 1.4.1 -> satisfiable by pear-pear.php.net/MDB2_Driver_mysql[1.4.1].
- pear-pear.php.net/MDB2_Driver_mysql 1.4.1 requires ext-mysql *
-> the requested PHP extension mysql is missing from your system.
Problem 2 - Installation request for pear-pear.php.net/validate_au 0.1.4 -> satisfiable by pear-pear.php.net/Validate_AU[0.1.4].
- pear-pear.php.net/Validate_AU 0.1.4 requires php >=4.2.0.0,<=6.0.0.0 -> your PHP version (7.1.4) does not satisfy that requirement
I guess you haven't enabled mysql in your XAMPP server yet. To do that:
At first close all running services of xampp. Now, go to your xampp folder. Then go to php folder and open the file named php.ini with any text editor. Now search for mysql in that file. You will find a line stating ;extension=php_mysqli.dll. The ; symbol describes it as a comment that means it is not enabled yet. Simply cut out that ; sign in front of that line which will now look like extension=php_mysqli.dll. Finally save the file and restart xampp.
PHP7 does not have the mysql_ database extension any more. Its dead Jim

Installing with Composer - php extensions: ext-mcrypt * and ext-intl * missing from your system on XAMPP

I've been trying to install Magento 2. I did load everything and with the last commands "composer update" or "composer install" I'm having problem.
Problem 1
- The requested PHP extension ext-mcrypt * is missing from your system.
Problem 2
- The requested PHP extension ext-intl * is missing from your system.
The thing is I'm not a pro Mac user or anything so it's very complicated for me to understand what I need to do to resolve this.
I saw a topic here at stackoverflow with the same problem but in that case they were using MAMP. I'm using XAMPP. They were telling to override PHP with MAMP's PHP with the .bash_profile file. I tried the same - didn't quite understand what I was doing.
So please, can anyone help me with solving ext-mcrypt and ext-intl stuff? I don't even know how to find out if they are missin or not.
Thanks!
Here's what in place of mcrypt
[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open
; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.algorithms_dir=
; Directory where to load mcrypt modes
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.modes_dir=
FINAL NOTES:
I marked answer as correct as it resolved my issue with mcrypt with the link from Laravel requires the Mcrypt PHP extension next I had issue with ext-intl and to resolve this please follow these links: http://codingexplained.com/operating-systems/mac/installing-php-intl-extension-os-x-mavericks and Php-intl installation on XAMPP
I did write an article about these issues and solution. hopefully this helps too!
Have a look at this answer Laravel requires the Mcrypt PHP extension and the following one.
If mcrypt is not enabled open your php.ini (see my first answer link above how to find it) and search for
;extension=php_mcrypt.so
then remove the ; from the beginning of that line. Same procedure for the other extension.
On linux I:
sudo apt-get install php7.0-mcrypt ;
sudo apt-get install php7.0-intl
Following things you can check -
Apache Version: 2.2 or 2.4 and Enable: mod_rewrite.mod_rewrite enables the server to perform URL rewriting.
PHP: 5.4.x where x = 11 or later 5.5.x and
Enable PHP Extension: PDO/MySQL,mbstring, mcrypt, mhash, simplexml, curl, gd2, ImageMagick 6.3.7 (or later) or both soap and
add xdebug.max_nesting_level=50000; at php.ini
MySQL Version : 5.6.x and upper
For more info please have a look at this URL -
http://magentostriker.blogspot.in/2015/03/magento-2-installation.html
Hope it will help.
If you are using Linux and PHP 7.0 you would use something like this:
yum install php70u-intl
I have PHP version 70u in the above example. Bu this will provide "ext-intl".

The requested PHP extension intl is missing from your system (SonataAdminBundle) in Symfony2

I try to install the sandbox but I get the following error from composer:
Loading composer repositories with package information Installing
dependencies from lock file Your requirements could not be resolved to
an installable set of packages.
Problem 1
- Installation request for sonata-project/intl-bundle 2.1.0 -> satisfiable by sonata-project/intl-bundle 2.1.0.`
- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
Problem 2
- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
- sonata-project/news-bundle 2.1.x-dev requires sonata-project/intl-bundle 2.1.* -> satisfiable by sonata-project/intl-bundle 2.1.0.
- Installation request for sonata-project/news-bundle 2.1.
I had the same problem while I was installing new Magento 2.0, after different hit and trials, I manged to solve it by following these steps:
I copied all icu* files from php directory to Appache directory, and it worked.
Php direcotry:
WAMP\bin\php\php5.5.12
Appache Directory:
WAMP\bin\apache\apache2.4.9
Make sure to un-comment following line in php.ini file:
extension=ext/php_intl.dll
Linux user
yum install php-intl
Like #Hugehornet pointed out - you should enable this extension in php.ini by uncommenting this line: extension=ext/php_intl.dll
If you use wamp's interface for this task you are actually updating the php.ini file located in apache's directory.
Example: C:\wamp\bin\apache\Apache2.4.4\bin\php.ini
Composer is using the one located in the php's installation directory.
Example: C:\wamp\bin\php\php5.4.12\php.ini
You should manually edit the latter and restart the wamp server.
You need to enable the intl extension in php just as the error says.
In your php.ini file, uncomment the line extension=ext/php_intl.dll or something like this.
Edit : note that if you are using wamp or something like this, you should be aware of the fact that the php.ini file in the wamp config is not necessarily the one used by composer.
First of all be sure that your server is isung x86 build (intl not working with x64), then:
activate intl extension in php.ini directly
copy all icu*.dll form php directory to apache directory
make sure your console using the same php folder you just configured
source.
In my windows system I have two php.ini files at the flowing paths:
C:\wamp\bin\php\phpx.y.z
C:\wamp\bin\apache\Apachex.y.z\bin
I don't know which one is in your path. Just make sure to add the extension in both of them to eliminate any doubt.
I am on a Mac OS X Yosemite, and I fix this error
the requested PHP extension mcrypt is missing from your system
by running the following commands :
brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
If intl has already been enabled and it doesn't works, add your PHP directory in the Path environment variable, then restart your server.
(for example C:\Program Files\wamp\bin\php\phpX.XXX.XXX for wamp)
It has worked for me!
On Ubuntu, Debian, and related Linux distributions
sudo apt-get install php-intl
to install the extension for the default PHP version.
For other versions a variation like apt-get install php7.3-intl will choose the correct extension if the version provided is correct.

Categories