You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/02/21 13:15:59 UTC

DO NOT REPLY [Bug 48364] PHP-generated pages are not cached in spite of pertinent header entries

https://issues.apache.org/bugzilla/show_bug.cgi?id=48364

Michael Stillwell <mj...@beebo.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW
                 CC|                            |mjs@beebo.org

--- Comment #6 from Michael Stillwell <mj...@beebo.org> 2010-02-21 12:15:56 UTC ---
I'm experiencing the same problem.  Here's the relevant logfile entries. 
(LogLevel debug.)

First CGI load:

[Sun Feb 21 12:10:26 2010] [debug] mod_cache.c(131): Adding CACHE_SAVE filter
for /scratch/cachetest.cgi
[Sun Feb 21 12:10:26 2010] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL
filter for /scratch/cachetest.cgi
[Sun Feb 21 12:10:26 2010] [debug] mod_deflate.c(619): [client 10.0.2.2] Zlib:
Compressed 15 to 17 : URL /scratch/cachetest.cgi
[Sun Feb 21 12:10:26 2010] [debug] mod_cache.c(633): cache: Caching url:
/scratch/cachetest.cgi
[Sun Feb 21 12:10:26 2010] [debug] mod_cache.c(639): cache: Removing
CACHE_REMOVE_URL filter.
[Sun Feb 21 12:10:26 2010] [info] mem_cache: Cached url:
http://beebo.local:8080/scratch/cachetest.cgi?

Second CGI load (looks okay to me, and the CGI file itself is not hit):

[Sun Feb 21 12:10:34 2010] [debug] mod_cache.c(282): cache: running CACHE_OUT
filter
[Sun Feb 21 12:10:34 2010] [debug] mod_cache.c(296): cache: serving
/scratch/cachetest.cgi

First PHP load:

[Sun Feb 21 12:10:46 2010] [debug] mod_cache.c(131): Adding CACHE_SAVE filter
for /scratch/cachetest.php
[Sun Feb 21 12:10:46 2010] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL
filter for /scratch/cachetest.php

Second PHP load (identical to first):

[Sun Feb 21 12:10:56 2010] [debug] mod_cache.c(131): Adding CACHE_SAVE filter
for /scratch/cachetest.php
[Sun Feb 21 12:10:56 2010] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL
filter for /scratch/cachetest.php

Contents of cachetest.cgi:

#!/usr/bin/env bash

echo "Cache-Control: max-age=3600, public"
echo "Content-type: text/plain"
echo
echo "CGI cache test"

Full headers returned:

HTTP/1.1 200 OK
Date: Sun, 21 Feb 2010 12:11:29 GMT
Server: Apache/2.2.8 (Ubuntu) mod_fastcgi/2.4.6
Cache-Control: max-age=3600, public
Vary: Accept-Encoding
Content-Length: 15
Content-Type: text/plain; charset=utf-8

Contents of cachetest.php:

<?php

header("Cache-Control: max-age=3600, public");
header("Content-Type: text/plain");

echo "PHP cache test";

Full headers returned:

HTTP/1.1 200 OK
Date: Sun, 21 Feb 2010 12:11:18 GMT
Server: Apache/2.2.8 (Ubuntu) mod_fastcgi/2.4.6
X-Powered-By: PHP/5.3.1
Cache-Control: max-age=3600, public
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/plain;charset=utf-8
X-Pad: avoid browser bug

In my case the PHP file is being served via FastCGI, if that makes a
difference.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org