Re: [PHPLIB] session variable and IE From: Florian Gnägi (gnaegi <email protected>)
Date: 11/25/99

I already discussed this with someone else on the list: IE has some
strange caching problems. it caches pages where it shouldnt. i can not
tell you which versions are affected but definitely are so:

id 4.5 for mac
maybe ie 5 for win

you can solve this by changing the url function in sess.inc as follows:

  ## url($url):
  ##
  ## Helper function: returns $url concatenated with the current
  ## session $id.
  function url($url){
   global $HTTP_USER_AGENT;
    $url=ereg_replace("[&?]+$", "", $url);
    switch ($this->mode) {
      case "get":
        $url .= ( strpos($url, "?") != false ? "&" : "?" ).
                urlencode($this->name)."=".$this->id;
      break;
      default:
        ;
      break;
    }
 
    # NS 4.5 MAC NO CACHABLE bugfix
    # gnaegi <email protected> 11.10.1999
    if (ereg(".*MSIE 4\.5.*Mac",$HTTP_USER_AGENT)){
        if (ereg(".*\.php3\?.*",$url)){
                $url=$url."&msie45macnocachebugfix=".time();
        }
        else{
                $url=$url."?msie45macnocachebugfix=".time();
        }
    }
    # end bugfix
    #
    return $url;
  }

this is only for mac ie 4.5.
now change it to

if (ereg(".*MSIE.*",$HTTP_USER_AGENT)){

to test it with any ie version. if it helps please send me the user agent
string ($HTTP_USER_AGENT).

this little fix appends a timestamp to every url so that an url does never
look the same and therefor ie will not show you a cached page. the tricky
thing on your problem is that in the background you will detect that the
counter page is wirking but is not displayed correctly...

hope this helps

-florian

On Thu, 25 Nov 1999, Phat K. Tran wrote:
 
>
> Hello,
>
> Is there special configuration for session to work with IE. The sample
> page work fine in Netscape but not IE.
>
> I use mod_php on with apache on linux and MySQL for database backend.
> very standard setup.
>
> Thanks
>
> PT > -
> PHP3 Base Library Mailing List. Send messages to
<phplib <email protected>>.
> To unsubscribe, send "unsubscribe" to <phplib-request <email protected>>
in
> the body, not the subject, of your message.
>

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.