PHP file will not be updated in the browser

For some odd reason, every time I update a file, it doesn't update inside the browser (localhost - wampserver). To be more specific. If I have a simple php script:

echo "hello world";

It works fine in the browser and displays the text "hello world".

However, if I upgrade it to

echo "goodbye world";

And refresh your browser, nothing happens. The text remains "hello world."

This has not been a problem before and has been perfectly updated. I tried to clear the browser cache, tested it in several browsers, restarted my Wamp server and restarted the computer. Nothing seems to work.

The only way code seems to be updated is to run the script from my IDE. Then it is displayed in the browser with the updated code. How can I fix this problem? I want him to return to how he was and be able to update in the browser.

Using wampserver php - 5.3.13, apache 2.2.22

+6
source share
2 answers

Your script is cached in memory using the opcache function . Disable it in php.ini:

opcache.enable = 0

But you also need to restart the server . If you use hosting, use the control panel to restart or try changing the php version to another and return.

+8
source

Google , , , opcache, .

, opcache.validate_timestamps 0, .

php.ini:

opcache.validate_timestamps = 1

php-fpm ( apache ), .

0

All Articles