Re: [PHP] session expires

2004-01-13 Thread Andreas Magnusson
"John W. Holmes" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Andreas Magnusson wrote: > > > Hi, I wonder if anyone knows of a way to detect if a session has expired > > (when your session.cookie_lifetime != 0). > > I've tried t

[PHP] session expires

2004-01-12 Thread Andreas Magnusson
Hi, I wonder if anyone knows of a way to detect if a session has expired (when your session.cookie_lifetime != 0). I've tried to see if the session-vars are unset, but that doesn't seem to be the case, still everythings seems to be lost. My problem is that I have a page which the user must log in t

Re: [PHP] Re: HTTP headers, IE and downloading

2003-12-23 Thread Andreas Magnusson
"John W. Holmes" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Andreas Magnusson wrote: > > > And through PHP (my script) it is: > > > > Accept-Ranges: bytes > > Cache-Control: private > > I've had the cache-control

[PHP] Re: HTTP headers, IE and downloading

2003-12-23 Thread Andreas Magnusson
Thank you for your reply! > AFAIK the headers sent here are: > > 'Content-Type' => 'application/x-octetstream', (perhaps other) > 'Cache-Control' => 'public', > 'Accept-Ranges' => 'bytes', > 'Connection'=> 'close' [snip] > Did you try something like this: > >h

[PHP] Re: HTTP headers, IE and downloading

2003-12-22 Thread Andreas Magnusson
Thanks for your reply! > Have a look at: http://pear.php.net/package/HTTP_Download I looked at it and it's hard to see what it does differently from what I do... > And the first comment of: > http://www.php.net/manual/en/function.session-cache-limiter.php Thanks, I've read that and I'm not usi

[PHP] Re: Magic Quotes

2003-12-21 Thread Andreas Magnusson
> Now I'm guessing that magic_quotes_runtime is the > one I need to have on, but is that so? I'm also > guessing that aside from using addslashes() and > stripslashes(), I could prob'ly turn on magic_quotes > in php_ini. > > But perhaps because of how I've heard turning > register_globals on via ph

[PHP] HTTP headers, IE and downloading

2003-12-21 Thread Andreas Magnusson
I'm writing a script to view/download an email-attachment. If the file happens to be an MS Word document and the browser IE (only tried with 6.0), then the download fails. If I choose to download (Content-Disposition: attachment; filename="whatever.doc") then only a part of the file (2/3) is saved

Re: [PHP] [posibleOT] Forcing entering te site thru index.php

2003-12-21 Thread Andreas Magnusson
> > There are several ways to do this. The most obvious is with cookies. > > Set up your index.php to initially create a cookie that authorizes a > > user to look in the site. On the rest of your PHP pages, check that > > this authorization cookie exists. If not, redirect to index.php. > Thanks