WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   Probleme mit Cookies... (Perl) (http://www.wcm.at/forum/showthread.php?t=33132)

SNo0py 15.10.2001 19:27

Probleme mit Cookies... (Perl)
 
Das folgende Problem hat mich schon zur Weissglut gebracht:
Code:

                # HTML-Header
                print qq~Content-type: text/html\n~;
               
                # Cookies
                print qq~Set-Cookie: huser=$cookies{'huser'}; path=/; expires=+$settings{'cookie_exp_huser'}d;\n~;        # 30 days
                print qq~Set-Cookie: hpwd=$cookies{'hpwd'}; path=/; expires=+$settings{'cookie_exp_hpwd'}m;\n~;                # 15 min
                print qq~\n~;
               
                # HTML-Head
                print qq~<html><head>... and so on...

$settings{'cookie_exp_huser'} und $settings{'cookie_exp_hpwd'} enthalten Werte (30 und 15);

Und er sprechert die Cookies nicht (ich hab im Cookie-File vom IE nachgeschaut - dort ist auch nix drinnen!)

Weiß wer, wo der Fehler liegt???

_m3 15.10.2001 20:39

print qq~Content-type: text/html\n\n~;

SNo0py 15.10.2001 22:03

Njet, des funkt net, weil dann speichert er die Cookies erst recht nicht... es darf nur ein \n kommen, und dann die restliche Header-Information und dann erst das "2." \n!!!

Das stimmt sicher!!!

_m3 15.10.2001 22:14

Türlich, hast recht - Sorry.

Also laut meinen Web-Quellen muss das Datum im Format "Wdy, DD-Mon-YYYY HH:MM:SS GMT" sein. Vielleicht ist das das Problem?

SNo0py 16.10.2001 07:39

Habs schon!!!
 
Danke, hat sich erledigt!

Das +30d bzw. +15m gehört erst umgerechnet (mit einer Funktion in der CGI.pm)... eben in das besagte Format! Jetzt funkt alles einwandfrei!!!

Thx!

Mike


Alle Zeitangaben in WEZ +2. Es ist jetzt 03:35 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag