Composer ldap extension issue - php

When i run composer install in my working directory i get:
Problem 1
- Installation request for tiesa/ldap 1.0.x-dev -> satisfiable by tiesa/ldap[1.0.x-dev].
- tiesa/ldap 1.0.x-dev requires ext-ldap * -> the requested PHP extension ldap is missing from your system.
I succesfully installed ldap extension on Ubuntu with apt-get install php5.6-ldap.
After apache2 restart i have ldap listed in phpinfo(), but Composer error remains same.
What am I missing? Thank you.

Related

Missing ext-dom when running composer update in Yii2 project

I am getting this error every time I run composer update in my Yii2 framework project:
Problem 1
- phpunit/phpunit[9.5.0, ..., 9.5.28] require ext-dom * ->
it is missing from your system. Install or enable PHP's dom extension.
- Root composer.json requires phpunit/phpunit ~9.5.0 ->
satisfiable by phpunit/phpunit[9.5.0, ..., 9.5.28].
I have tried running run Composer with --ignore-platform-req=ext-dom but returns the same error.
This error message is indicating that the phpunit/phpunit package requires the ext-dom extension, but it is not installed or enabled on your system.
To resolve this issue, you need to install the ext-dom extension on your system. You can do this by running the following command in your terminal:
sudo apt-get install php-xml
After installing the ext-dom extension, try running composer update again to see if the issue has been resolved. If you continue to experience the same error, you may need to restart your web server or check your PHP configuration to ensure that the ext-dom extension is properly loaded.

can't download from composer on linux OS

Problem 1
- Installation request for kreait/firebase-php 4.35 -> satisfiable by kreait/firebase-php[4.35.0].
- kreait/firebase-php 4.35.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
The error is asking you to install the module mbstring if you are using ubuntu
try this
sudo apt-get install php-mbstring

Composer installation requirements

I am trying to install composer to the laravel project.
When im doing sudo composer install in projects directory it shows me two errors:
Problem 1
- Installation request for simplesoftwareio/simple-qrcode dev-master -> satisfiable by simplesoftwareio/simple-qrcode[dev-master].
- simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for esendex/sdk ^1.3 -> satisfiable by esendex/sdk[v1.3.0].
- esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
I was checking how to install it and I found these commands:
composer require simplesoftwareio/simple-qrcode
composer require esendex/sdk
Anyway, they are giving me the same error. Is there anything I can do about it?
Looks like you have some PHP modules missing.
For PHP5
sudo apt-get install php5-curl
sudo apt-get install php5-gd
For PHP7
sudo apt-get install php7-curl
sudo apt-get install php7-gd
Packages may be different depending on your OS
Is there anything I can do about it?
Yes. You can install the two PHP modules that Composer tells you are required:
simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Exactly how you do that will depend on your operating system.
Ubuntu 16.10, for example, offers php-gd and php-curl system packages.

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)?

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