httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David <>
Subject [users@httpd] Re: Webserver is caching .php files.
Date Thu, 30 Oct 2003 15:11:45 GMT
So it's not the webserver which is caching, is it?

You can add this to your php-scripts:

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

before any other output.


[AOE] Maniac wrote:
> Heya alltogether,
> we have a little problem with our Apache Webserver (running 1.3.26) and PHP 4.1.2.
> The situation is quite simple:
> A .php script is being constantly called by a flash movie (same with http refresh) and
checks for some database variables.
> Though the content of the php out changes during these updates, the server won't recognize
it and return a cached - and therefore old - php file.
> Globally caching isnt enabled at all. No proxy servers are running.
> The problem could be solved when turning on the MS INet Explorer cache option to check
the page everytime, but since most default installations are set to automatically, we have
a problem here.
> Driving a little windows test webserver (KeyFocus Webserver), it contained an option
to assign all CGI output with a "nocache" header, which solved the problem.
> Unfortunately I do not know any corresponding option under the Apache environment, so
I ask for you help.
> Many thanks in advance,
> Jan Dubber from Germany.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message