Memory exhausted and PHP Version mismatch errors. Not able to install image intervention laravel 5.5 package - laravel-5

I want to change color of my image. So I'm trying to use image/intervention of laravel.
Followed their documentation:
http://image.intervention.io/getting_started/installation
https://packagist.org/packages/intervention/image
When i tried the following, i got an memory exhausted error:
1. composer require intervention/image
Error:
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
E:\xampp\htdocs\Myproject>php -r "echo ini_get('memory_limit').PHP_EOL;"
512M
So, i followed the below link and increased to memory_limit=-1 from memory_limit=512M
https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
Now, again tried this command composer require intervention/image. Now i got a different error:
Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ~7.2.0 but your PHP version (7.3.11) does not satisfy that requirement.
Problem 2
- mpociot/vat-calculator dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
- mpociot/vat-calculator dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
- mpociot/vat-calculator dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
- Installation request for mpociot/vat-calculator dev-master -> satisfiable by mpociot/vat-calculator[dev-master].
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.
Why am i getting these errors? How can i install image/intervention package in my application?
I'm using laravel 5.5 , PHP 7.3.11
As the error says, do i have to install 7.2.0 php version? Or is there any other solutions?

The first problem come because there is something like "php": "~7.2", in your composer.json. Change to "php": ^7.2" to allow all PHP minor version upper 7.2. Run composer update php to fix composer.lock
The second problem is because you are missing soap extension in PHP. Try to install it. This question/anwser could help you.

Related

composer require yajra/laravel-oci8:^8 in laravel 8

PHP version 7.3.22
Running on Laravel Framework version 8
root#df77c47e6f1e:/var/www/oracle-laravel-v8# composer require yajra/laravel-oci8:^8
PHP Warning: PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: /usr/lib/php/20180731/oci8_12c (/usr/lib/php/20180731/oci8_12c: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/oci8_12c.so (/usr/lib/php/20180731/oci8_12c.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: /usr/lib/php/20180731/pdo_oci (/usr/lib/php/20180731/pdo_oci: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_oci.so (/usr/lib/php/20180731/pdo_oci.so: cannot open shared object file:
No such file or directory)) in Unknown on line 0
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is about to be released and the older 1.x releases will self-update directly to it once it is released. To avoid surprises update now to the latest 1.x version which will prompt you before self-updating to 2.x.
Run composer self update command and clear composer cache
composer self-update
Then
composer clear-cache
There is nothing wrong about laravel and composer here. It seems that your system's php installation/configuration is wrong (pdo_oci extension is missed or misconfigured) so it can't process anything, even fails at composer startup.
Composer itself is package manager written in php. And laravel is framework written in php. So it's laravel is running on php, not vice versa.

Laravel Passport installation error on the live hosting [duplicate]

This question already has answers here:
Composer error: "PHP extension fileinfo is missing from your system"
(12 answers)
Closed 3 years ago.
I am trying to install laravel passport on a live hosting but it's giving me this error in the terminal, Help me if possible :)
Problem 1
- league/flysystem 1.0.53 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- league/flysystem 1.0.53 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- league/flysystem 1.0.53 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for league/flysystem (locked at 1.0.53) -> satisfiable by league/flysystem[1.0.53].
To enable extensions, verify that they are enabled in your .ini files:
- /opt/alt/php72/etc/php.ini
- /opt/alt/php72/link/conf/alt_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.```
You must enable the fileinfo extension by removing the starting semicolon ( ; ) from your php.ini
;extension=fileinfo
And then restart your web server

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

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

how to install package with composer?

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?

Resources