<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Apache 2 problem</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Have you tried putting this at the top of your
pages that you use in the logged in section?</FONT></DIV>
<DIV><FONT face=Arial size=2><PRE class=php><?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?></PRE></FONT></DIV>
<DIV><FONT face=Arial size=2>taken from <A
href="http://www.php.net/manual/en/function.header.php">http://www.php.net/manual/en/function.header.php</A> this
sounds like ie is caching the pages, and i have experienced similar problems
with ie in the past, and this usually does the trick.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If does not work, give me a bell I may have a
few more tricks up my sleeve.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kind Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Daniel T. Morgan AKA plod</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=terry.john@bbc.co.uk href="mailto:terry.john@bbc.co.uk">Terry
John</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=discuss@swlug.org.uk
href="mailto:'discuss@swlug.org.uk'">'discuss@swlug.org.uk'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, May 20, 2003 4:37 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [SWLUG] Apache 2 problem</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<P><FONT face=Arial size=2>I'm helping develop a website and to make things a
bit easier I copied the info to a Redhat 7.1 box at home using the supplied
Apache 1.3. It worked perfectly using my usual Browser Opera on Win95 across a
bit of thin ethernet.</FONT></P>
<P><FONT face=Arial size=2>Getting all keen I upgraded to Redhat 8.0, and with
it Apache 2. It took a little while but it happily runs my php pages (.phtml
suffix) but there is a problem. To get to the members page you need to supply
a username & password then the username is registered in a cookie using
the php session commands. Once logged in you are free to move around the site
and each page should give your username and site credits.</FONT></P>
<P><FONT face=Arial size=2>The problem is that the browser seems to use cached
pages so if you go to a previously visited page you just get the old
information. The login page is the same page as the members' main page if you
try to back to it after a login you just get the login page as if you hadn't
logged in. Worse still the logout page is the main index page with a Logout=1
parameter but since the browser doesn't get the main page and uses the cache
instead the logout doesn't happen.</FONT></P>
<P><FONT face=Arial size=2>Even more confusing is that Netscape 7 works
perfectly and looking at the /etc/httpd/logs/access_log both browsers seem to
be requesting the same information. I'm guessing that Opera is doing something
like "Get page if newer" but it doesn't realise it is a server parsed php page
and so should get new every time. Is there something in the Apache config I'm
missing somewhere?</FONT></P>
<P><FONT face=Arial size=2>Both Opera 6.05 and the latest one behave in the
same way. I'll try IE if I remember later :-)</FONT> </P>
<P><FONT face=Arial size=2>Terry</FONT> </P><CODE><FONT size=3><BR><BR>BBCi at
http://www.bbc.co.uk/<BR><BR>This e-mail (and any attachments) is confidential
and may contain <BR>personal views which are not the views of the BBC unless
specifically <BR>stated.<BR>If you have received it in error, please delete it
from your system, do <BR>not use, copy or disclose the information in any way
nor act in <BR>reliance on it and notify the sender immediately. Please note
that the <BR>BBC monitors e-mails sent or received. Further communication will
<BR>signify your consent to this.<BR></BLOCKQUOTE></FONT></CODE></BODY></HTML>