XAMPP is caching .html files running as PHP
Posted
by Lee
on Stack Overflow
See other posts from Stack Overflow
or by Lee
Published on 2010-04-10T02:01:49Z
Indexed on
2010/04/10
2:13 UTC
Read the original article
Hit count: 372
I have XAMPP (latest version) installed on my Mac OS 10.6.3
I've added the following to .htaccess because I want .html to be interpreted as PHP.
AddType application/x-httpd-php .php .html
The problem is that the default XAMPP config seems to be caching .html files as static... so even though the PHP statements inside are being called (for example, 'echo time()' in index.html displays the dynamic output)... the actual file is being cached.
When I make changes to a .html file, I've having to restart Apache for it to load the newest changes.
Looking at httpd.conf, it looks like it's loading the following cache mods..
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
Any idea how to implement a system whereby it checks the timestamp of the file, before loading it from cache?
Thanks!
© Stack Overflow or respective owner