cvs: php-gtk-web /manual admin-notes.php set-magic-cookie.php unset-magic-cookie.php
[email protected] ("Colin Viebrock") Thu, 09 Aug 2001 20:54:05 -0000
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <cvscmv997390444@cvsserver> |
cmv Thu Aug 9 16:54:05 2001 EDT
Modified files:
/php-gtk-web/manual admin-notes.php set-magic-cookie.php
unset-magic-cookie.php
Log:
cookie problems
Index: php-gtk-web/manual/admin-notes.php
diff -u php-gtk-web/manual/admin-notes.php:1.13 php-gtk-web/manual/admin-notes.php:1.14
--- php-gtk-web/manual/admin-notes.php:1.13 Thu Aug 9 16:49:48 2001
+++ php-gtk-web/manual/admin-notes.php Thu Aug 9 16:54:04 2001
@@ -11,7 +11,7 @@
if (isset($MAGIC_COOKIE)) {
list($user, $pass) = explode(":", base64_decode($MAGIC_COOKIE));
} else if ($save && $user && $pass && verify_password($user,$pass)) {
- SetCookie("MAGIC_COOKIE", base64_encode("$user:$pass"), time()+3600*24*12, '/');
+ SetCookie("MAGIC_COOKIE", base64_encode("$user:$pass"), time()+(86400*7), '/' );
}
/*
Index: php-gtk-web/manual/set-magic-cookie.php
diff -u php-gtk-web/manual/set-magic-cookie.php:1.4 php-gtk-web/manual/set-magic-cookie.php:1.5
--- php-gtk-web/manual/set-magic-cookie.php:1.4 Thu Aug 9 16:15:39 2001
+++ php-gtk-web/manual/set-magic-cookie.php Thu Aug 9 16:54:04 2001
@@ -2,7 +2,7 @@
if (isset($user) && isset($pass)) {
$MAGIC_COOKIE = base64_encode("$user:$pass");
# we set a cookie good for five years
- SetCookie('MAGIC_COOKIE', base64_encode("$user:$pass"), time()+157248000);
+ SetCookie('MAGIC_COOKIE', base64_encode("$user:$pass"), time()+(86400*365*5), '/' );
commonHeader('Magic Cookie');
echo '<h1>Magic Cookie</h1>';
echo "<P><b>Cookie set</b>.</P>";
Index: php-gtk-web/manual/unset-magic-cookie.php
diff -u php-gtk-web/manual/unset-magic-cookie.php:1.2 php-gtk-web/manual/unset-magic-cookie.php:1.3
--- php-gtk-web/manual/unset-magic-cookie.php:1.2 Thu Aug 9 16:15:41 2001
+++ php-gtk-web/manual/unset-magic-cookie.php Thu Aug 9 16:54:04 2001
@@ -1,5 +1,5 @@
<?
-SetCookie('MAGIC_COOKIE', '', 0);
+SetCookie('MAGIC_COOKIE', '', 0, '/');
unset($MAGIC_COOKIE);
commonHeader('Magic Cookie');