Session

Ai o întrebare legată de PHP? Incercăm să îi găsim soluţie. Sau poate doar vrei să publici un cod interesant.

Moderatori: Zamolxe, Moderatori


Avatar utilizator
Hano
Average Member
Mesaje: 68
Membru din: Joi Sep 22, 2005 8:00 am
Contact:

Mesajde Hano » Mie Mai 10, 2006 6:58 pm

Session NOT set!
http://www.phpromania.net/forum/posting.php
Array ( [refered] => http://www.phpromania.net/forum/posting.php )

am facut acest test si la mine a returnat pagina asta, deci sessiunea nu a fost setata dar s-a setat in momentul accesarii. acum se mai pune problema si de browser, nu toate browserele returneaza http_referer, iar dupa cum am citit eu de pe php.net...

'HTTP_REFERER'

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

MasterPhoton
Senior Member
Mesaje: 437
Membru din: Joi Mar 06, 2003 7:03 pm

Mesajde MasterPhoton » Mie Mai 10, 2006 7:03 pm






Avatar utilizator
Hano
Average Member
Mesaje: 68
Membru din: Joi Sep 22, 2005 8:00 am
Contact:

Mesajde Hano » Mie Mai 10, 2006 7:41 pm

poate te ajuta

Tudor.b
PHPRomania Supporter
Mesaje: 24
Membru din: Sâm Oct 01, 2005 11:40 pm

Mesajde Tudor.b » Mie Mai 10, 2006 7:41 pm

Tu dai session_start() peste tot?
Blog la

Avatar utilizator
Hano
Average Member
Mesaje: 68
Membru din: Joi Sep 22, 2005 8:00 am
Contact:

Mesajde Hano » Mie Mai 10, 2006 7:44 pm

da si asta este ideea cu session_start();


MasterPhoton
Senior Member
Mesaje: 437
Membru din: Joi Mar 06, 2003 7:03 pm

Mesajde MasterPhoton » Mie Mai 10, 2006 7:55 pm

@hano
sorry, nu ajuta





MasterPhoton
Senior Member
Mesaje: 437
Membru din: Joi Mar 06, 2003 7:03 pm

Mesajde MasterPhoton » Mie Mai 10, 2006 8:12 pm

site 1:
www.XXXXXXX.com/test.html contine un iframe cu src='www.site2.com/export.php'
site 2/export.php:
verifica de unde vine cererea, la prima accesare, prin HTTP_REFERER (asta merge), si seteaza $_SESSION['referer'] = $_SERVER['HTTP_REFERER']; (asta NU mai merge). La a doua accesare in iframeul din site1, sesiunea nu mai exista...DE CE? (si mai ales de ce ieri a mers???)





Avatar utilizator
Hano
Average Member
Mesaje: 68
Membru din: Joi Sep 22, 2005 8:00 am
Contact:

Mesajde Hano » Mie Mai 10, 2006 8:25 pm

pai primul fisier, adica www.XXXXXXX.com/test.html, trebuie sa fie tot fisier php

parerea mea.

MasterPhoton
Senior Member
Mesaje: 437
Membru din: Joi Mar 06, 2003 7:03 pm

Mesajde MasterPhoton » Mie Mai 10, 2006 8:28 pm

?
De ce???
Contine un iframe, deci NU trebuie.





Avatar utilizator
raul_
Senior Member
Mesaje: 711
Membru din: Joi Sep 15, 2005 8:00 am

Mesajde raul_ » Joi Mai 11, 2006 11:30 am

Ultima oară modificat Mie Mai 31, 2006 8:30 am de către raul_, modificat 1 dată în total.
I have learned that you shouldn't compare yourself to others - they are more screwed up than you think!

MasterPhoton
Senior Member
Mesaje: 437
Membru din: Joi Mar 06, 2003 7:03 pm

Mesajde MasterPhoton » Joi Mai 11, 2006 3:00 pm






Avatar utilizator
raul_
Senior Member
Mesaje: 711
Membru din: Joi Sep 15, 2005 8:00 am

Mesajde raul_ » Joi Mai 11, 2006 3:05 pm

Ultima oară modificat Mie Mai 31, 2006 8:30 am de către raul_, modificat 1 dată în total.
I have learned that you shouldn't compare yourself to others - they are more screwed up than you think!

MasterPhoton
Senior Member
Mesaje: 437
Membru din: Joi Mar 06, 2003 7:03 pm

Mesajde MasterPhoton » Joi Mai 11, 2006 3:11 pm






Avatar utilizator
raul_
Senior Member
Mesaje: 711
Membru din: Joi Sep 15, 2005 8:00 am

Mesajde raul_ » Joi Mai 11, 2006 3:17 pm

Ultima oară modificat Mie Mai 31, 2006 8:31 am de către raul_, modificat 1 dată în total.
I have learned that you shouldn't compare yourself to others - they are more screwed up than you think!


Înapoi la “Cod PHP”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 9 vizitatori