LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: John Edwards <isplist@pinnacle.net.au>
  To  : <linuxsa@linuxsa.org.au>
<james@adam.com.au> Date: Sat, 28 Apr 2001 12:57:31 +0930

Re: PHP weirdness

Hi James,

>        setcookie("username",$username, time() -2682000);

Some browsers suck at cookie expire dates. Try:

setcookie("username","", time() -2682000)

..to delete the cookie instead of just expire it, or at least set it to
something that won't match $user.

>        $fp = popen("/bin/ls *.html","r");

Have a look at the dir and readdir functions for PHP. It's a better habit to
get into for cross-platform compatability, and servers that use php's
safe_mode.

>I am absolutely stumped. One idea though, Do all browsers need the "path"
>specified in the cookie? Would this affect it?

Some do. Some also require 2x '.' in the domain name, so calling it from
domain.com doesn't work, but www.domain.com does. This is also related to
the annoying .com.au cookies can exist. Netscape devcentre has the details
on cookie specs.

John Edwards


-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page