[SWLUG] Apache 2 problem

Terry John terry.john at bbc.co.uk
Tue May 20 22:27:37 UTC 2003


No. Didn't work. I tried the full list as suggested.

I also followed up the php site pages and tried
session_cache_limiter('nocache');
instead. Still no joy.

Terry

-----Original Message-----
From: Daniel T. Morgan
To: discuss at swlug.org.uk
Sent: 5/20/03 4:45 PM
Subject: Re: [SWLUG] Apache 2 problem

Have you tried putting this at the top of your pages that you use in the
logged in section?
<?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

?>
taken from http://www.php.net/manual/en/function.header.php
<http://www.php.net/manual/en/function.header.php>  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.
 
If does not work, give me a bell I may have a few more tricks up my
sleeve.
 
Kind Regards
Daniel T. Morgan AKA plod

----- Original Message ----- 
From: Terry  <mailto:terry.john at bbc.co.uk> John 
To: 'discuss at swlug.org.uk' <mailto:'discuss at swlug.org.uk'>  
Sent: Tuesday, May 20, 2003 4:37 PM
Subject: [SWLUG] Apache 2 problem



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.

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.

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.

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?

Both Opera 6.05 and the latest one behave in the same way. I'll try IE
if I remember later :-) 

Terry 



BBCi at http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain 
personal views which are not the views of the BBC unless specifically 
stated.
If you have received it in error, please delete it from your system, do 
not use, copy or disclose the information in any way nor act in 
reliance on it and notify the sender immediately. Please note that the 
BBC monitors e-mails sent or received. Further communication will 
signify your consent to this.




BBCi at http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain 
personal views which are not the views of the BBC unless specifically 
stated.
If you have received it in error, please delete it from your system, do 
not use, copy or disclose the information in any way nor act in 
reliance on it and notify the sender immediately. Please note that the 
BBC monitors e-mails sent or received. Further communication will 
signify your consent to this.





More information about the Swlug mailing list