Plesk for Linux
kb: technical
ABT: Group B
Applicable to:
- Plesk for Linux
Symptoms
Composer returns the following error:
Note: the "dumpautoload" parameter in the command below can be another.
# composer dumpautoload
PHP Fatal error: Uncaught PharException: 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
Cause
The corrupted or modified composer.phar
file
Resolution
Reinstall the composer as follows:
-
Connect to the server via SSH.
-
Change the working directory to the required:
# cd /usr/lib/plesk-9.0/
-
Go to the composer official website:
-
Execute commands, mentioned in the "Command-line installation" article section:
Comments
2 comments
It seems that the hash value for composer-setup.php has changed since this article has been published, so the instructions no longer work.
Maybe Plesk users should be referred to the current hash value which is https://getcomposer.org/download/
or it might be better to use the recommended script for installing programmatically, which is found at https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
Hello @Maghreb Services SARL,
Thank you for the feedback!
Indeed the hash value is changed from time to time and the solution stopped to be valid as well
I reworked the article - there is a reference to the official Composer website now from which one the up-to-date commands have to be executed
Please sign in to leave a comment.