Answer the question
In order to leave comments, you need to log in
How to beat the delay when displaying changes in a PHP script on AWS?
In general, the situation is like this. Trying to use Amazon Lightsail as a Development server. I am creating an instance - Wordpress stack from Bitnami on Debian 10. Server configuration is minimal: 512 MB RAM / 1 vCPU / 20 Gb SSD. Wordpress is already preinstalled and configured, just download plugins and themes. But here's the problem. When I change any file on the server, be it PHP, CSS or JS, the changes are not immediately visible. When you refresh the page in the browser, there is no change for about a minute. And then abruptly refreshed. I wrote a test script that shows the delay between the file being written to the server and the current time. In this case, it was 1 minute 18 seconds.
filemtime() = Thu, 24 Feb 2022 01:09:01 +0000
time() = Thu, 24 Feb 2022 01:10:19 +0000
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_event_module (shared)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
socache_shmcb_module (shared)
reqtimeout_module (shared)
filter_module (shared)
deflate_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
headers_module (shared)
setenvif_module (shared)
version_module (shared)
proxy_module (shared)
proxy_connect_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_fcgi_module (shared)
proxy_ajp_module (shared)
proxy_balancer_module (shared)
slotmem_shm_module (shared)
ssl_module (shared)
http2_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
negotiation_module (shared)
dir_module (shared)
actions_module (shared)
alias_module (shared)
rewrite_module (shared)
Answer the question
In order to leave comments, you need to log in
The problem was solved by changing one value in php.ini:
opcache.enable = 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question