Question

When I try to complete the checkout by paying with Hosted Payment Form (mastercard module) I get an error 400 Bad request. I was reading the exception.log file and I found an error that says the following:

main.CRITICAL: The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly {"exception":"[object]

I was searching in internet and tried the following commands:

export COMPOSER_HOME="$HOME/.config/composer/" export CGR_BASE_DIR="$HOME/.config/composer/global" export CGR_BIN_DIR="$HOME/.config/composer/vendor/bin"

but none of this worked yet, i'm still getting the error. Hope someone can help me. Greetings!

Was it helpful?

Solution

go to .htaccess of the store. Add this line at the top of your MagentoRootfolder/.htaccess file

SetEnv COMPOSER_HOME COMPOSER_HOME=~/.composer
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top