I am running phpwiki-1.3.4 on apache-2.0.44 and php-4.3.1. I have added an alias and corresponding Directory section to my httpd.conf file in which I proceed to set all kinds of headers and expires:
Alias /genwiki /usr/local/apache2/htdocs/phpwiki/index.php
<Directory "/usr/local/apache2/htdocs/phpwiki/">
Options MultiViews FollowSymLinks
AllowOverride None
AcceptPathInfo on
#
# Do not cache wiki pages!
#
ExpiresActive on
ExpiresByType images/gif "access plus 1 week"
ExpiresByType images/jpg "access plus 1 week"
ExpiresByType images/png "access plus 1 week"
ExpiresDefault "now plus 0 seconds"
I don't completely understand. What are you trying to accomplish, and what is not working? (You say you have confirmed the headers are being set.)
That said, I believe 1.3.4 sets a bogus (bad format, wrong timezone) Last-Modified header with no other cache-control headers. (I've changed that, and the current CVS version of PhpWiki handles the cache control a bit more intelligently on it's own.) (I.e. this is in a state of flux still.)
You might try either upgrading to current CVS code,
or grepping for and commenting out the lines
which set Last-Modified in the PhpWiki source.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running phpwiki-1.3.4 on apache-2.0.44 and php-4.3.1. I have added an alias and corresponding Directory section to my httpd.conf file in which I proceed to set all kinds of headers and expires:
Alias /genwiki /usr/local/apache2/htdocs/phpwiki/index.php
<Directory "/usr/local/apache2/htdocs/phpwiki/">
Options MultiViews FollowSymLinks
AllowOverride None
AcceptPathInfo on
#
# Do not cache wiki pages!
#
ExpiresActive on
ExpiresByType images/gif "access plus 1 week"
ExpiresByType images/jpg "access plus 1 week"
ExpiresByType images/png "access plus 1 week"
ExpiresDefault "now plus 0 seconds"
Header add Expires "Fri, 30 Oct 1998 14:19:41 GMT"
Header add Cache-Control "max-age=0, must-revalidate, no-cache"
Header add Pragma "no-cache"
Order allow,deny
Allow from all
</Directory>
I have also confirmed that these headers are being set in pages served up by phpwiki via telnet to port 80.
Is there some esoteric phpwiki or php thing I am missing? Do I need to hack into the templates for pages to specify META tags etc. for cache control?
jeff
I don't completely understand. What are you trying to accomplish, and what is not working? (You say you have confirmed the headers are being set.)
That said, I believe 1.3.4 sets a bogus (bad format, wrong timezone) Last-Modified header with no other cache-control headers. (I've changed that, and the current CVS version of PhpWiki handles the cache control a bit more intelligently on it's own.) (I.e. this is in a state of flux still.)
You might try either upgrading to current CVS code,
or grepping for and commenting out the lines
which set Last-Modified in the PhpWiki source.