Composer is not installed properly

Hi There

I’d like to update a pimcore installation (version 5.1.1) using the built-in update tool. Unfortunately, I get the error: "Composer is not installed properly! Please ensure that composer is in your PATH variable."
I double-checked the installation of composer. It is working and I am using it for other things as well. I tried updating composer (to Version 1.6.2) and checked the PATH variable (which contains /usr/local/bin, in which composer is stored) but still it is not working, neither locally nor on the server.

I have the same problem on another Pimcore installation with version 4.6.3.

Does anyone has an idea what the problem could be?

Thank you,
Silvan

Try checking this for tips:

I presume that your PHP-FPM (if you are using it) doesn’t have a PATH set and eventhough you define the path in the Pimcore System settings that still causes problem with the shebang in the composer. One quick workaround is as described by Dominik to just specify the path to composer with php in the front.

Cheers, Igor

That worked. Thank you!

See also Composer and php not found in System-Requirements-Check

PATH did not work (no idea why) but an update of parameters.yml was the solution

Best regards, Markus

\website\config\di.example.php —> di.php
and add the following contents;

<?php

// Pimcore is using PHP-DI, see http://php-di.org/doc/

return [
	"pimcore.executable.composer" => "/usr/local/bin/composer",
];

@capitalfuse your solution is for Pimcore 4 and not Pimcore 5.

Yes, I showed the solution for version 4.6.3, I posted because the topic shows the same problem for 4.6.3.

You are right, over read that :D, sorry bout that.