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?

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

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 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.

2
  • No there is no auto deployment system. Commented Jan 9 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
    – Puneet
    Commented Jan 22 at 13:26

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.