Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Czy da sie?
kendy77
post
Post #1





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 11.10.2003

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


Mam sesje i chce aby bez zamykania okna przegladarki wygenerowac nowe ID sesji, czyli de facto stworzyc nowa sesje.Czy da sie to uczynic?

Z gory dzieki za pomoc
Go to the top of the page
+Quote Post
spenalzo
post
Post #2





Grupa: Zarejestrowani
Postów: 2 064
Pomógł: 1
Dołączył: 22.01.2003
Skąd: Poznań

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


[php:1:7fa1a7b678]<?php
session_unset();
session_destroy();
session_start();
?>[/php:1:7fa1a7b678]
Może tak?
Go to the top of the page
+Quote Post
kendy77
post
Post #3





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 11.10.2003

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


hmm sad.gif(

2d32e6ff3da1b3991d452d49f031d7a1
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at d:serwerfirmasesja.php:5) in d:serwerfirmasesja.php on line 8

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at d:serwerfirmasesja.php:5) in d:serwerfirmasesja.php on line 8
2d32e6ff3da1b3991d452d49f031d7a1

czyli jednak nie dziala ;(
Go to the top of the page
+Quote Post
rzseattle
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 554
Pomógł: 0
Dołączył: 4.04.2002
Skąd: Tychy

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


Cytat
hmm sad.gif(

2d32e6ff3da1b3991d452d49f031d7a1
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at d:serwerfirmasesja.php:5) in d:serwerfirmasesja.php on line 8

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at d:serwerfirmasesja.php:5) in d:serwerfirmasesja.php on line 8
2d32e6ff3da1b3991d452d49f031d7a1  

czyli jednak nie dziala ;(


bo wyslales juz jakies dane do przegladarki i dlatego wywala ci ten blad. Po chcesz niszczyc sesje w polowie skryptu?questionmark.gif
jesli ci est to naprawde potrzebne to poczytaj o [manual:f293e8df50]ob_start[/manual:f293e8df50] i [manual:f293e8df50]ob_flush[/manual:f293e8df50]


--------------------
"Real children don't go hoppity-skip unless they are on drugs."
Go to the top of the page
+Quote Post
DeyV
post
Post #5





Grupa: Zarząd
Postów: 2 277
Pomógł: 6
Dołączył: 27.12.2002
Skąd: Wołów/Wrocław




Cytat
(php 4 >= 4.3.2)
[manual:0f17581f26]session_regenerate_id[/manual:0f17581f26] --  Update the current session id with a newly generated one  
Description
bool session_regenerate_id ( void )

session_regenerate_id() will replace the current session id with a new one, and keep the current session information.  


--------------------
"Niezależnie od tego, jakie masz osiągnięcia, ktoś Ci pomaga..."
Go to the top of the page
+Quote Post
kendy77
post
Post #6





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 11.10.2003

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


Wiem o regenerate_id ale po tym kodzie:

<?
session_start();
$id = session_id();
print ("$id");
session_regenerate_id();
$id = session_id();
print ("$id");
?>

wyskakuje:

2d32e6ff3da1b3991d452d49f031d7a1
Warning: session_regenerate_id(): Cannot send session cookie - headers already sent by (output started at d:serwerfirmasesja.php:4) in d:serwerfirmasesja.php on line 5
c173d3cf743bef6ac7e60d24ca0d49da

oczywisie po kazdorazowym kliknieciu na 'odswiez' dolny numer sie zmienia, i owszem, ale skad ten komunikat o bledzie?
Go to the top of the page
+Quote Post
rzseattle
post
Post #7





Grupa: Przyjaciele php.pl
Postów: 554
Pomógł: 0
Dołączył: 4.04.2002
Skąd: Tychy

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


upewni czy czegokolwiek nie wyslales do przegladarki(moze byc to nawet pojedyncza spacja)


--------------------
"Real children don't go hoppity-skip unless they are on drugs."
Go to the top of the page
+Quote Post
scanner
post
Post #8





Grupa: Zarząd
Postów: 3 503
Pomógł: 28
Dołączył: 17.10.2002
Skąd: Wrocław




Cytat
[php]<?
session_start();
$id = session_id();
print ("$id");
//(...)
?> skad ten komunikat o bledzie?
z tego, ze wysyales do przegladarki print().
A juz ci kilkakrotnie mowiono, ze nie mozna nic wyslac do przegladarki przed wyslaniem headerow...


--------------------
scanner.info
Warto pamiętać: KISS, DRY
Go to the top of the page
+Quote Post
rzseattle
post
Post #9





Grupa: Przyjaciele php.pl
Postów: 554
Pomógł: 0
Dołączył: 4.04.2002
Skąd: Tychy

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


Cytat
Cytat
[php]<?
session_start();
$id = session_id();
print ("$id");
//(...)
?> skad ten komunikat o bledzie?
z tego, ze wysyales do przegladarki print().
A juz ci kilkakrotnie mowiono, ze nie mozna nic wyslac do przegladarki przed wyslaniem headerow...


scaner skurczybyku ... niezauwazylem tego :wink:


--------------------
"Real children don't go hoppity-skip unless they are on drugs."
Go to the top of the page
+Quote Post
scanner
post
Post #10





Grupa: Zarząd
Postów: 3 503
Pomógł: 28
Dołączył: 17.10.2002
Skąd: Wrocław




[php:1:cb7943b6dc]<?php
$rzseattle->debug = true;
?>[/php:1:cb7943b6dc]Teraz powinieneś zauważać smile.gif


--------------------
scanner.info
Warto pamiętać: KISS, DRY
Go to the top of the page
+Quote Post
kendy77
post
Post #11





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 11.10.2003

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


Dzieki, przyjalem smile.gif
dziala smile.gif)
Go to the top of the page
+Quote Post
rzseattle
post
Post #12





Grupa: Przyjaciele php.pl
Postów: 554
Pomógł: 0
Dołączył: 4.04.2002
Skąd: Tychy

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


Cytat
[php:1:90c1441496]<?php
$rzseattle->debug = true;
?>[/php:1:90c1441496]Teraz powinieneś zauważać smile.gif


[php:1:90c1441496]<?php
if ( !$bbCode ){
$rzseattle->debug = FALSE;
}
?>[/php:1:90c1441496]

nie bo warunki mi nie pozwalaja laugh.gif


--------------------
"Real children don't go hoppity-skip unless they are on drugs."
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 Aktualny czas: 20.08.2025 - 06:25