Cannot Update Composer in Command Line - php

I am updating the composer and it shows up some error like below.
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
- pusher/pusher-php-server v3.4.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- pusher/pusher-php-server v3.4.0 requires php >=5.4 <7.3 -> your PHP version (7.3.6) does not satisfy that requirement.
- pusher/pusher-php-server v3.3.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- pusher/pusher-php-server v3.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- pusher/pusher-php-server 3.4.x-dev requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for pusher/pusher-php-server ^3.3 -> satisfiable by pusher/pusher-php-server[3.4.x-dev, v3.3.0, v3.3.1, v3.4.0, v3.4.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\PHP7\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

the pusher v3 doesn't support php version that higher than 7.3
there are some options :
first is downgrade the php to the requirement (not recomended), the second one is use this command to upgrade the pusher to version 4
composer require pusher/pusher-php-server

could please check curl enabled in your php use ;extension=php_curl.dll remove semi colon in php.ini file and try

try following command
install first curl using following command.
sudo apt-get install curl
then use
sudo apt-get install composer

Related

Magento installation not working after editing php.ini

I tried to install Magento 2.4.5 on windows I am using windows 8.1 by the way and I downloaded xampp8.1.12, composer 2.4.4, and when I typed this command
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
I got this error :
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires magento/product-community-edition 2.4.5-p1 -> satisfiable by magento/product-community-edition[2.4.5-p1].
- magento/product-community-edition 2.4.5-p1 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.
Problem 2
- magento/magento2-functional-testing-framework[3.7.0, ..., 3.12.0] require ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.
- Root composer.json requires magento/magento2-functional-testing-framework ^3.7 -> satisfiable by magento/magento2-functional-testing-framework[3.7.0, ..., 3.12.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` in a terminal to see which files PHP uses in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
The strange thing is that I removed the comma from all of these extensions in the php.ini file:
extension=gd
extension=intl
extension=soap
extension=sockets
extension=sodium
extension=xsl
and I still have the same error
and by the way, when I restart xampp I get this error:
The Procedure entry point crypto_core_ristretto255_scalar _ reduce could not be located in the dynamic link library C:\xampp8.1\php\ext\php_sodium.dll
I tried running this command
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
but it didn't work
Please make sure below all extensions are enabled in php.ini
sodium
ext-bcmath
ext-ctype
ext-curl
ext-dom
ext-gd
ext-hash
ext-iconv
ext-intl
ext-mbstring
ext-openssl
ext-pdo_mysql
ext-simplexml
ext-soap
ext-xsl
ext-zip
ext-sockets

Library GD issue

While installing maatwebsite/excel composer it is throwing an error regarding gd library is missing. But I checked in my system gd is already enabled.
Please see the error message below. I also attached a screenshot for the error and phpinfo screen.
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for phpoffice/phpspreadsheet 1.14.1 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
maatwebsite/excel 3.1.21 requires phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
Installation request for maatwebsite/excel 3.1.21 -> satisfiable by maatwebsite/excel[3.1.21].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Cant install mPDF package using Composer PHP - requires ext-gd

I am trying to install mPDF package and when I run the command composer require mpdf/mpdf it displays these errors:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
Problem 2
- mpdf/mpdf v8.0.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- mpdf/mpdf v8.0.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- mpdf/mpdf v8.0.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- Installation request for mpdf/mpdf ^8.0 -> satisfiable by mpdf/mpdf[v8.0.0, v8.0.1, v8.0.2].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Can I just download mPDF and place it in my working repo? Or do I have to use Composer to install it?
I tried to search for this errors and I think the only solution would be to install chocolatey and then use it to install php7.3.2-gd , but if there is a better solution please let me know!

PHP Mongodb installation issue on Linux Mint 17.3 Rosa

I am new to mongodb ,
I am following one tutorial and proceeding step by step , I installed mongodb and access it from shell .
Then I am doing php mongodb installation part .
I am doing it through composer , install composer and run the below command
composer require mongodb/mongodb
I am getting this below error output in my terminal .
$ composer require mongodb/mongodb
Using version ^1.4 for mongodb/mongodb
./composer.json has been created
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
- mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.4.1 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.4 -> satisfiable by mongodb/mongodb[1.4.0, 1.4.1, 1.4.2].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php5/cli/php.ini
- /etc/php5/cli/conf.d/05-opcache.ini
- /etc/php5/cli/conf.d/10-pdo.ini
- /etc/php5/cli/conf.d/20-json.ini
- /etc/php5/cli/conf.d/20-mysql.ini
- /etc/php5/cli/conf.d/20-mysqli.ini
- /etc/php5/cli/conf.d/20-pdo_mysql.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, deleting ./composer.json.
Here I added this things to my php.ini file and restarted the apache file.
extension = mongodb.so
PHP VERSION - PHP 5.5.9 AND Linux Mint 17.3 Rosa
Any suggestion?
where I am doing wrong

Installing Sylius

I am installing Sylius. In my command prompt I did
composer create-project -s dev sylius/sylius
I get this error message :
C:\wamp\www\Symfony>composer create-project -s dev sylius/sylius
Installing sylius/sylius (dev-master 18d981683430c0afd1a102b6fc67f8ffeaabddc0)
- Installing sylius/sylius (dev-master master)
Cloning master
Created project in C:\wamp\www\Symfony\sylius
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/icu 1.2.x-dev -> satisfiable by symfony/icu[1.2.x-dev].
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
Problem 2
- Installation request for instaclick/php-webdriver 1.0.x-dev -> satisfiable by instaclick/php-webdriver[1.0.x-dev].
- instaclick/php-webdriver 1.0.x-dev requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 3
- Installation request for instaclick/php-webdriver dev-master -> satisfiable by instaclick/php-webdriver[dev-master].
- instaclick/php-webdriver dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 4
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/symfony 2.3.x-dev requires symfony/icu ~1.0 -> satisfiable by symfony/icu[1.2.x-dev].
- Installation request for symfony/symfony 2.3.x-dev -> satisfiable by symfony/symfony[2.3.x-dev].
What I tried :
php composer.phar self update
php composer.phar install
Deleting sylius directory
Reinstalling sylius with the create-project command
Fresh installation of Symfony 2.3.4 and reinstallation of sylius
Did what was told in the first answer: enable extension curl and intl
Used the function get_loaded_extension() to confirm that curl and intl are loaded. Well, it is loaded
WAMP has two php.ini files, one for apache and one for CLI. When you click on WAMP tray icon in php modules you can see only modules enabled for apache, and so enabling and disabling modules takes effect only for apache copy of php.ini.
Try enabling curl and intl in X:\path\to\wamp\bin\php\php.ini which is config for CLI (BTW. config for apache is placed in X:\path\to\wamp\bin\apache\bin\php.ini).
It looks like you need to install two PHP extensions to make this work: curl and intl (which provides the lib-icu required by symfony/icu). Since you are using Windows, I recommend the official guide on how to install extensions on Windows systems. You can find the intl extension in the PECL repository here.
curl should be installed on your WAMP already, but disabled by default. See the top answer to this question for instructions on how to enable it.
Sylius has now released the latest version v1.0.0 which I have covered in a blog to install it. Here is the Source: https://www.cloudways.com/blog/install-sylius-ecommerce-framework/
You just need to run the following cammands in SSH or Terminal Sylius will be installed
$ composer create-project -s beta sylius/sylius-standard project
$ cd project
$ npm install
$ npm run gulp
$ bin/console sylius:install

Categories