Whatever I do in composer, I get this message
[InvalidArgumentException]
Package is not installed: ext-xdebug-2.4.1.0
I have tried actually installing that package and get the same error.
Any suggestions?
Running Arch Linux with composer as global.
EDIT: as you can see, I have xdebug installed and enabled.
╭[andrew#TheSandbox] : [~]
╰>php -v
PHP 7.0.14 (cli) (built: Dec 7 2016 17:11:27) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
╭[andrew#TheSandbox] : [~]
╰>php -m
[PHP Modules]
...
xdebug
...
[Zend Modules]
Xdebug
Related
I am trying to build a laravel 9 project through homestead but composer is failing since Laravel 9 requires 8.1.^
I removed my homestead box
vagrant box remove laravel/homestead
then added it again
vagrant box add laravel/homestead
but When i check in CLI,
vagrant#homestead:~$ php -v
PHP 8.0.1 (cli) (built: Jan 13 2021 08:22:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.1, Copyright (c) Zend Technologies
with Zend OPcache v8.0.1, Copyright (c), by Zend Technologies
I have homestead 12.1.0
Any advice on how to fix this?
Found the solution. The issue was not with the box but instead with vagrant/homestead since I was running an older version.
I updated my vagrant/homestead on my machine to 13.2.1 and this fixed the problem.
I have a symfony4 project and i'm running composer install but i'm getting the following error:
Problem 1
- ocramius/package-versions 1.5.1 requires php ^7.3.0 -> your PHP version (7.2.23) does not satisfy that requirement.
- ocramius/package-versions 1.5.1 requires php ^7.3.0 -> your PHP version (7.2.23) does not satisfy that requirement.
- Installation request for ocramius/package-versions 1.5.1 -> satisfiable by ocramius/package-versions[1.5.1].
however if i do a php -v
this is what i get:
PHP 7.3.10 (cli) (built: Sep 30 2019 22:02:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.10, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.10, Copyright (c) 1999-2018, by Zend Technologies
can someone help me with that?
cheers,
d
I have different version of Php on my laravel homestead. If i lunch php -v on command bash i have active php 7.3 but if i create and index.php with phpinfo() i have this 'PHP Version 7.2.14-1+ubuntu18.04.1+deb.sury.org+1'
php -v
HP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019
10:19:33) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine
v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.0beta1, Copyright (c) 2002-2018, by Derick Rethans
with blackfire v1.24.2~linux-x64-non_zts73, https://blackfire.io, by Blackfire
in my index.php
phpinfo();
i have
PHP Version 7.2.14-1+ubuntu18.04.1+deb.sury.org+1
I want to use only php 7.3 how can i do it please?
For ubuntu users this should work (with apache)
sudo a2dismod php7.X
sudo a2enmod php7.3
sudo service apache2 restart
Witn nginx in your .conf change the version for fastcgi
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
service nginx restart
I try to install an extension using the composer:
composer require magenest/module-worldpay-and-subscriptions:2.0.0
And get this:
[InvalidArgumentException]
Package magenest/module-worldpay-and-subscriptions at version 2.0.0 has a PHP requirement incompatible with your PHP version (5.4.45)
When I run the php -v command it returns:
PHP 5.4.45 (cli) (built: Nov 28 2017 10:34:31)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.4, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.0.5, Copyright (c) 1999-2015, by Zend Technologies
However, I have all PHP version installed on my server so when I run a command I usually specify the PHP version beforehand, e.g. php-7.0 bin/magento
Also, when using fakechroot - it has PHP version set within the context of the domain group itself. e.g when I run this command: /usr/bin/fakechroot /usr/sbin/chroot /microcloud/domains/vampm2 /bin/bash and then php -v I get:
[http]$ /usr/bin/fakechroot /usr/sbin/chroot /microcloud/domains/vampm2 /bin/bash
bash-4.1$ php -v
PHP 7.0.26 (cli) (built: Dec 19 2017 17:26:19) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.4, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.0.26, Copyright (c) 1999-2017, by Zend Technologies
bash-4.1$ exit
Can anyone tell me how can I run the composer require without composer to read the default PHP 5.4? Working on Magento ver 2.1.8
How can I run the composer in specified version e.g. like I do with Magento php-7.0 bin/magento?
There are three options:
Run composer with another PHP version, eg. through php-7.0 $(which composer)
Add distinct version requirements to your composer.json through a config key like "platform": { "php": "7.0.12" } (see https://getcomposer.org/doc/06-config.md#platform for more details)
Run composer with the flag --ignore-platform-reqs to ignore platform requirements completely. Then whatever you require is installed, without any check for installed PHP versions or extensions
when i connect to a nginx node - is there a way to execute php scripts?
I basicly want to run composer, but when calling ./composer.phar it says:
"/usr/bin/env: php: No such file or directory"
I suppose i have to run composer locally and upload the files manually, right?
Yes, you can run PHP via SSH on a Jelastic nginx PHP node.
There's a tutorial at http://kb.layershift.com/jelastic-install-composer describing how to install composer on Apache and nginx PHP nodes on the Jelastic platform. I think it will help with your issue.
EDIT: I tested PHP CLI via SSH on a Jelastic nginx PHP node and confirmed it works fine for all PHP versions:
nginx#nginxphp /var/www $ which php
/usr/bin/php
nginx#nginxphp /var/www $ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
nginx#nginxphp /var/www $ php -v
PHP 5.3.29 (cli) (built: Aug 24 2014 19:41:55)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
nginx#nginxphp /var/www $ php -v
PHP 5.4.32 (cli) (built: Sep 4 2014 10:33:47)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
nginx#nginxphp /var/www $ php -v
PHP 5.5.16 (cli) (built: Sep 4 2014 10:19:16)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
nginx#nginxphp /var/www $ php -v
PHP 5.6.0 (cli) (built: Sep 4 2014 11:18:01)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
The above is whilst switching the PHP version via the Jelastic dashboard, and is taken using the latest Jelastic version (2.5). If you don't have the same behaviour, I think you should contact your hosting provider for clarification because it should work fine.
Composer install completes ok for me just like this:
nginx#nginxphp ~ $ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /var/lib/nginx/composer.phar
Use it: php composer.phar