Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [opera] problem z przekazywaniem sesji
GrayHat
post 10.12.2007, 15:24:12
Post #1





Grupa: Zarejestrowani
Postów: 566
Pomógł: 18
Dołączył: 23.08.2003
Skąd: Łomża

Ostrzeżenie: (0%)
-----


Witam.
Natrafiłem na problem przy przekazywaniu sesji między subdomenami w operze.
Pod IE i FF wszystko działa. Ciastko sesyjne jest ustawiane na ".domena.pl".
Problem pojawia się w Operze. Ciastko nie jest ustawiane na host ".domena.pl" tylko na host subdomeny, która je ustawia (xxx.domena.pl) i nie wiem czemu tak się dzieje.

Spotkał się ktoś z podobnym problemem?

Pozdrawiam


--------------------
*Note: No animals were killed durning the construction of this post.
Go to the top of the page
+Quote Post
slammer
post 11.12.2007, 11:10:54
Post #2





Grupa: Zarejestrowani
Postów: 187
Pomógł: 6
Dołączył: 31.08.2005
Skąd: Bielsko-Biała

Ostrzeżenie: (0%)
-----


Myślę, że powinno pomóc narzucenie domeny dla ciastka:

  1. Object.prototype.$setCookie = function(sName, sValue, oExpires, sPath, sDomain, bSecure) {
  2. var sCookie = sName +"="+encodeURIComponent(sValue);
  3. if(oExpires){
  4. sCookie += "; expires="+oExpires.toGMTString();
  5. }
  6. if(sPath){
  7. sCookie += "; path="+sPath;
  8. }
  9. if(sDomain){
  10. sCookie += "; domain="+sDomain;
  11. }
  12. if(bSecure){
  13. sCookie += "; secure";
  14. }
  15. document.cookie = sCookie;
  16. }
  17. Object.prototype.$getCookie = function(sName) {
  18. var sRE = "(?:; )?"+sName+"=([^;]*);?";
  19. var oRE = new RegExp(sRE);
  20. if(oRE.test(document.cookie)) {
  21. return decodeURIComponent(RegExp["$1"]);
  22. } else {
  23. return null;
  24. }
  25. }
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 23.06.2025 - 11:24