1

The file env.php is changing automatically and randomly.

Environment:

Cluster server

Deployer

Magento 2.4.6-p3

Redis, varnish and cloudflare

php 8.1

Here is the actual the env.php

 'session' => [
 'save' => 'db',
 'gc_probability' => 1,
 'gc_divisor' => 1000,
 'gc_maxlifetime' => 7200
],
'cache_types' => [
 'config' => 1,
 'layout' => 1,
 'block_html' => 1,
 'collections' => 1,
 'reflection' => 1,
 'db_ddl' => 1,
 'compiled_config' => 1,
 'eav' => 1,
 'customer_notification' => 1,
 'config_integration' => 1,
 'config_integration_api' => 1,
 'google_product' => 1,
 'full_page' => 1,
 'config_webservice' => 1,
 'translate' => 1,
 'vertex' => 1,
 'fishpig_wordpress' => 1
],
'http_cache_hosts' => [
 [
 'host' => 'xx.xxx.x.xx',
 'port' => 'yyyy'
 ],
 [
 'host' => 'xx.xxx.x.xx',
 'port' => 'yyyy'
 ]
],

On a random time of the day and randomly the env.php changes to this:

'session' => [
 'save' => 'Redis'
],
'cache_types' => [
 'config' => 1,
 'layout' => 1,
 'block_html' => 1,
 'collections' => 1,
 'reflection' => 1,
 'db_ddl' => 1,
 'compiled_config' => 1,
 'eav' => 1,
 'customer_notification' => 1,
 'config_integration' => 1,
 'config_integration_api' => 1,
 'google_product' => 1,
 'full_page' => 0,
 'config_webservice' => 1,
 'translate' => 1,
 'vertex' => 1,
 'fishpig_wordpress' => 1
],
'http_cache_hosts' => [
 [
 'host' => '127.0.0.1',
 'port' => '8080'
 ]
],

what has been changes is session, full_page, and http_cache_host.

Does anyone encountered a similar issue? what could be the cause of this problem?

Deepak MageDivine
4931 gold badge5 silver badges23 bronze badges
asked Jan 3, 2024 at 13:12

2 Answers 2

1

Did you commit the file app/etc/env.php from your dev machine to your repo?

That file shouldn't be in your repository because it'll be different for each environment.

Tom

answered Jan 3, 2024 at 13:37
1
  • Hi Tom, I have the env.php in the .gitignore, I mean the file does not change upon doing pull from the repository. Commented Jan 3, 2024 at 15:31
0

Your Server setup have auto deployment system. I mean CICD or container jenkins system, if yes then you have to check container setup etc.

answered Jan 6, 2024 at 9:08
2
  • No there is no auto deployment system. Commented Jan 9, 2024 at 8:21
  • Can you connect with me real time so that i will analyse and let you know. my skype id is puneetak4 and phone whatsapp number is 9891472590 Commented Jan 22, 2024 at 13:26

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.