• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved PHP composer error

antonio.abansys

New Pleskian
Server operating system version
CentOS7
Plesk version and microupdate number
Plesk Obsidian Version 18.0.46
Hi to all,

Im trying to install a composer package but plesk show me this error:

[LIST] [*]Failed to retrieve paths for the installed packages: In PluginManager.php line 744: [*] [*]plesk/composer-command-info (installed globally) contains a Composer plugin [*]which is blocked by your allow-plugins config. You may add it to the list [*]if you consider it safe. [*]You can run "composer global config --no-plugins allow-plugins.plesk/compos [*]er-command-info [true|false]" to enable it (true) or disable it explicitly [*]and suppress this exception (false) [*]See https://getcomposer.org/allow-plugins [*] [/LIST]

When I connect to the server (CentOS 7) and run the command say me that:
Composer 2.3.0 dropped support for PHP <7.2.5 and you are running 5.4.16, please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting
If I run composer self-update --2.2 again repeat the same error.

I searching in forum that I must run on my plesk default installation
/opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar global config --no-plugins allow-plugins.plesk/composer-command-info true
But the error persists
I have updated the plesk and the composer plugin.

Im desesperate any knows how to solve that?
 

Attachments

  • error plesk composer.png
    error plesk composer.png
    45.5 KB · Views: 22
Thank you for your answer, I have updated all extensions.

Finally I can solve this with composer 2.0.4 and modifying the Panel.ini
 
@mrad
  1. Go to Extenions > My Extensions > Panel.ini Editor > Open.
  2. Switch to the Editor tab.
  3. Specify the Composer and plugin versions by adding the lines below at the end of the file as below:
Code:
[ext-composer]
composerVersion = '2'
 
Back
Top