• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue composer version and php version

TheFreeman

New Pleskian
Hello,

following Problem:

1608401931088.png

Installed and working PHP 7.4.13
Plesk Composer-Extension 1.10.5

But why composer tells me something abaout PHP 7.2.24 ???
How can i fix this?
Thank you in advance!

LG
 
I'm unexperienced with this but woud like to ask you if you could please explain the special string "laravel/laravel:^8.0" in your prefer-dist argument. I've never seen a carot ^ in such a string. What does that mean? Is it the correct syntax?
 
I presume that in your virtual host, where you are trying to install laravel, you have php 7.2, not 7.4
You can check and swith PHP version in Plesk -> subscriptions -> domain.com -> PHP settings

The command
Code:
php -v
is not relevant in the virtual host context in Plesk.
 
I'm unexperienced with this but woud like to ask you if you could please explain the special string "laravel/laravel:^8.0" in your prefer-dist argument. I've never seen a carot ^ in such a string. What does that mean? Is it the correct syntax?
:8.0 means, you expect exactly this version.
:^8.0 means, this version but if existing the highest subversion.
In my case it was the 8.19.0
I presume that in your virtual host, where you are trying to install laravel, you have php 7.2, not 7.4
You can check and swith PHP version in Plesk -> subscriptions -> domain.com -> PHP settings

The command
Code:
php -v
is not relevant in the virtual host context in Plesk.
OK...But they are both the same versions.
 
always cal composer with the php version you want to use and pretend the native php does not exist eg

/opt/plesk/php/7.4/bin/php composer update
 
Back
Top