• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Resolved composer phar has a broken signature

Edi Duluman

Basic Pleskian
Hello!

I haven't used composer to install stuff for a while now ... but since I just had to install something with it today, I stumbled upon the following error:

PHP Fatal error: Uncaught exception 'PharException' with message 'phar "/usr/lib/plesk-9.0/composer.phar" has a broken signature' in /usr/lib/plesk-9.0/composer.phar:23
Stack trace:
#0 /usr/lib/plesk-9.0/composer.phar(23): Phar::mapPhar('composer.phar')
#1 {main}
thrown in /usr/lib/plesk-9.0/composer.phar on line 23

Note that I am already at the latest version of Plesk 17.8.11 #22 ( and I already seen that KB article which I've tried ).
First point from the workarounds ( given updating did not help ) returns in another error, saying path doesn't exist after returning that composermng.py file, whereas the second point ends up with an installer corrupt error message ..

Also need to mentiont that this happens on all 5 of my servers ... even if they are all updated to #22. Running on Debian 8.11
 
Hello Edi,
try to reinstall composer with these steps:
Code:
# cd /usr/lib/plesk-9.0/
Code:
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Code:
# php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Code:
# php composer-setup.php
Code:
# php -r "unlink('composer-setup.php');"
 
Step 3, just like I tried from the KB, returns installer corrupt. So, by checking sha384 myself I got the following::

Code:
php -r "echo hash_file('SHA384', 'composer-setup.php' );"
93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8

Which is different from the one you gave me but probably because their file changed meanwhile.. anyway, I went on and ran the instructions without that check.

So, for whoever gets into that issue, just skip the step and make sure the composer setup file is actually from their site, and not some malware.
 
Last edited:
Back
Top