Jump to content

Prestashop 8.1 randomly gets its index.php changed


Recommended Posts

Randomly, when we make changes on our BO, the index file will change to one with zero file size:

index.php filesize 0

When we open the file to inspect it, it has no content obviously.

We also noticed this file .php-cs-fixer.dist.php which is probably causing the issue. It has been deleted, uploaded the default index.php and website is running again.

1.gif

Link to comment
Share on other sites

It occurs sporadically, usually around 4:30 am, and a few more times throughout the day. The behavior is odd and suggests that this version might be compromised. Additionally, the .htaccess file is altered, causing images not to display.

The solution is straightforward: upload the original index.php file from the initial installation. However, a new problem arises – the back office (BO) doesn't function properly because two files have disappeared due to the changes made in the index.php file.

Symfony/Component/Cache/Traits/PhpFilesTrait.php
vendor/twig/twig/src/Environment.php

Once both get re-uploaded, then BO works and .htaccess can be re-generated yet this is too much to do it on a daily basis.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...