how to install package with composer? - codeigniter

I am trying to install a push-notification library for codeigniter using composer fromhere .But when i do run a command it throws this error -> Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for wrep/notificato ^1.2 -> satisfiable by wrep/notificato[1.2.0].
- wrep/notificato 1.2.0 requires ext-sockets * -> the requested PHP extension sockets is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- E:\xampp\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.
I also did commented the php.ini extension=php_intl.dll and also its the same error occuring. How can i solve this?

Related

Laravel kreait/laravel-firebase install failed

I am working on a project and tried to install firebase package using:
composer require kreait/laravel-firebase
But it returns different errors:
Using version ^4.1 for kreait/laravel-firebase
./composer.json has been updated
Running composer update kreait/laravel-firebase
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- lcobucci/jwt[4.1.5, ..., 4.2.x-dev] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
- kreait/laravel-firebase 4.1.0 requires kreait/firebase-php ^6.0 -> satisfiable by kreait/firebase-php[6.0.0, ..., 6.x-dev].
- kreait/firebase-php[6.0.0, ..., 6.x-dev] require lcobucci/jwt ^4.1 -> satisfiable by lcobucci/jwt[4.1.0, ..., 4.2.x-dev].
- Root composer.json requires kreait/laravel-firebase ^4.1 -> satisfiable by kreait/laravel-firebase[4.1.0].
To enable extensions, verify that they are enabled in your .ini files:
- D:\xampp\php\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-sodium` to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require kreait/laravel-firebase:*" to figure out if any version is installable, or "composer require kreait/laravel-firebase:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
How can i fix this problem?. Is there any solution for this?
You need to install/activate sodium goto, D:\xampp\php\ and open file php.ini.
Now search for sodium
You will see ;extension=sodium
Remove semi colon ; and save file.
Now reload apache, and run the composer again.
For me, I just follow this steps.
step 1.
At first, You need to install/activate sodium goto D:\xampp\php\ and open file php.ini.
Now search for sodium
You will see ;extension=sodium
Remove semi colon ; and save file.
Now reload apache, and run the composer again.
Step 2.
Delete composer.lock file
composer require kreait/laravel-firebase --with-all-dependencies
The answer by Murad Ali worked for me. The only change was I accessed the php.ini file via Xamp the windows app. To edit go to config then select php.ini from the list and edit from there. Scroll to Line 953
the php.ini file
xamp server screen and

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

I am trying to install "jenssegers/mongodb": "^3.6" with composer for a laravel 6 project, my command line is looking at (MongoDB shell version v4.2.0), my PHP version is 7.2, I have 7.2 Thread Safe (TS) x86 driver installed and I have the extension enabled in the php.ini file, any help appreciated, thank you.
Problem 1
- mongodb/mongodb 1.5.0 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb v1.5.x-dev requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.6.x-dev requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.5.0 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.5.0 -> satisfiable by mongodb/mongodb[1.5.0, 1.6.x-dev, v1.5.x-dev].
To enable extensions, verify that they are enabled in your .ini
files:
- C:\WINDOWS\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Found the solution and It was php.ini file not saving when editing with notepad++. So opened the ini file with admin permission.

How to install ingenico epayments in Magento 2?

I am having trouble installing ingenico epayments on magento 2.
The documentation advises to install with composer (ingenico doc) but I can not fix the following error after "composer require ingenico/ingenico_epayments_ogn2:3.3.1":
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for ingenico/ingenico_epayments_ogn2 3.3.1 -> satisfiable by ingenico/ingenico_epayments_ogn2[3.3.1].
- ingenico/ingenico_epayments_ogn2 3.3.1 requires ingenico/library-ops-m2 ~3.3.0 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
I also tried to install the module with the magento 2 setup wizard. But the Readiness Check fails for "Check Cron Scripts" and "Check Component Dependency"
I identified the cron that poses problem (update) and when I execute it manually I have this error :
"/usr/bin/php /var/www/html/update/cron.php"
PHP Warning: require_once(/var/www/html/update/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/update/app/bootstrap.php on line 15
PHP Stack trace:
PHP 1. {main}() /var/www/html/update/cron.php:0
PHP 2. require_once() /var/www/html/update/cron.php:7
PHP Fatal error: require_once(): Failed opening required '/var/www/html/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/update/app/bootstrap.php on line 15
PHP Stack trace:
PHP 1. {main}() /var/www/html/update/cron.php:0
PHP 2. require_once() /var/www/html/update/cron.php:7
It's because the vendor folder is not in the update folder but in the root directory.
Thanks for your help!
Install this module using below way and use a package which has both the folders zip(library and extension)
composer config repositories.ingenico artifact /path/to/folder/with/package/
composer require ingenico/ingenico_epayments_ogn2
composer update

Missing PHP extension when installing Laravel on Mac

I am trying to install laravel on mac using terminal, but I am getting this error. I have php version 7.3 and the latest version of composer. How do I download the php exstensions using terminal on Mac.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/php5/lib/php.ini
- /usr/local/php5/php.d/10-extension_dir.ini
- /usr/local/php5/php.d/20-extension-opcache.ini
- /usr/local/php5/php.d/40-curl.ini
- /usr/local/php5/php.d/40-openssl.ini
- /usr/local/php5/php.d/50-extension-apcu.ini
- /usr/local/php5/php.d/50-extension-curl.ini
- /usr/local/php5/php.d/50-extension-gmp.ini
- /usr/local/php5/php.d/50-extension-igbinary.ini
- /usr/local/php5/php.d/50-extension-imap.ini
- /usr/local/php5/php.d/50-extension-intl.ini
- /usr/local/php5/php.d/50-extension-mcrypt.ini
- /usr/local/php5/php.d/50-extension-mongodb.ini
- /usr/local/php5/php.d/50-extension-mssql.ini
- /usr/local/php5/php.d/50-extension-pdo_pgsql.ini
- /usr/local/php5/php.d/50-extension-pgsql.ini
- /usr/local/php5/php.d/50-extension-propro.ini
- /usr/local/php5/php.d/50-extension-raphf.ini
- /usr/local/php5/php.d/50-extension-readline.ini
- /usr/local/php5/php.d/50-extension-redis.ini
- /usr/local/php5/php.d/50-extension-xsl.ini
- /usr/local/php5/php.d/99-liip-developer.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.
Was recently experiencing the same issue. This is what fixed it for me:
download PHP from brew (brew install php)
make system use that version of PHP instead of the pre-installed PHP
edit ~/.zshrc or ~/.bashrc to add the following:
export PATH="/usr/local/opt/php#7.3/bin:$PATH"
export PATH="/usr/local/opt/php#7.3/sbin:$PATH"
Then run
source ~/.zshrc
or
source ~/.bashrc
After I did that Laravel installed with no issues!

I want to create image intervention

For user profile I want to create profile picture, but when I write composer require intervention/image in terminal I get this error:
- intervention/image 2.4.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- intervention/image 2.4.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\AppServ\php5\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.
Read what Composer suggests. Just install the PHP extenion fileinfo. Check the installation guide on PHP.net: http://php.net/manual/en/fileinfo.installation.php
Make sure you have the php_fileinfo.dll in your php/ext folder. Then uncomment this line in your php.ini
extension=php_fileinfo.dll

Resources