0
votes

this question is similar to: disable php files caching for debugging

Currently, I try to debug a PHP website but I discover that there is some cache problem. When I update a PHP file, the update may or may not be available right now. I even deleted the index.php and the Website was still working.

This is not a browser cache problem because I use Chrome Incognito + Chrome Developer with "Disable Cache" checked + "Empty cache and Hard reload".

I think the problem come from the fact that PHP were upgraded to 7.3.XX (from 5.X) and there's a OPcache module enabled by default.

Is there a way to ignore this module. This website is on a shared hosting plan so I may not be able to edit config files.

EDIT: OPcache was not activated in the Cpanel. I also downgrade to PHP 5.6 and the problem is still here.

New observation: Before the PHP downgrade, I got a info.php file that print the phpinfo(). It was and is still showing 7.3 as version (cache?). I created a copy of that file and named it info2.php. This one is showing 5.6 as as PHP version. So there is still a cache somewhere.

Also, is this possible that the .htaccess file is also cached?

1

1 Answers

1
votes

If your hoster has enabled user.ini files you can drop an ini file in your project directory containing:

opcache.enable=0

PHP Manual - Opcache config