Composer is not installed properly


#1

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


#2

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


#3

That worked. Thank you!


#4

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


#5

\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",
];

#6

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


#7

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


#8

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