1

For a while our Craft CMS webshop show errors in the control panel. This happens 25%-50% of the requests. Looking in the phperror log a lot of this errors are logged:

[13-Dec-2021 23:00:05 UTC] An Error occurred while handling another error: yii\base\InvalidConfigException: craft\web\Request::cookieValidationKey must be configured with a secret key.

The SECURITY_KEY is set in the .env and also in /config/general.php

It seams like the server can't read or find the .env sometimes. Earlier i found a topic to change the php variable 'variables_order' EGPCS. This was not the solution for me.

Anyone some tips?

Craft CMS 3.7.24
PHP 7.4.26
Hosted on Siteground

1 Answer 1

2

For anyone getting this error in version 4. For me the php.ini solution also didn't work. It helped to add a key named: CRAFT_SECURITY_KEY='YOURKEY' in the .env file, replace YOURKEY with your actual SECURITY_KEY

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.