phpBB and Apache 2.0.45 refresh problem.

Technical Q&A involving operating systems, networking, software, and hardware issues.

Moderator: jasonb

Post Reply
User avatar
jasonb
Site Administrator
Posts: 105
Joined: Tue Apr 22, 2003 1:54 pm
Location: Toronto, Canada
Contact:

phpBB and Apache 2.0.45 refresh problem.

Post by jasonb »

This seems to be a "hot topic" with phpBB. The issue being that the phpBB pages do not get refreshed with changes and you have to force a reload with your browser before you see the updated information. It all has to do with the browser caching information. Even though phpBB 2.0.4 claims to have fixed the problem, it really hasn't.

The workaround is to modify three files in your phpBB installation.

First, edit includes/page_header.php, and look for the line Work around for "Current" Apache 2. Replace the whole section of "header" statements thereafter (you can remove all of the conditional statements and their existing blocks of code) with the following:

header ('Pragma: no-cache');
header ('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

Now, edit both overallheader.tpl and simple_headter.tpl in templates/subSilver (assuming that you're using subSilver, otherwise locate your themes appropriate header.tpl files). At the top of each file, find the existing "meta http-equiv" lines and append the following two lines of code underneath what's already there:

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">

That should fix all refresh problems. Note that discussions on the phpBB boards mention that this fix may causes issues with proxies - I can't confirm that since I don't use one. If anybody has more information on how to fix that remaining issue, feel free to post it here.
Post Reply