Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z sesjami
mk83
post
Post #1





Grupa: Zarejestrowani
Postów: 72
Pomógł: 0
Dołączył: 17.02.2005

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


Witam
Mam nastepujacy przykladowy skrypt ktory bez problemu dziala w PHP4:

  1. <?
  2. if($_GET['mod']==logowanie) { $login=$_GET['login']; session_register("login"); }
  3. if(isset($_SESSION['login']))
  4. {
  5. print("witaj:".$_SESSION['login']);
  6. }
  7. else {
  8. ?>
  9. <form action=test.php method=GET>
  10. <input type=hidden name=mod value=logowanie>
  11. <input type=text name=login>
  12. <br><input type=submit value=go></form>
  13. <?}?>


Natomiast pod PHP5, pojawia sie problem. Minowicie w momecie w ktorym urzywam session_register("login"); , sesja nie jest rejestrowana odrazu a dopiero po odswierzeniu przgladarki.
Dostaj rowniez nastepujace ostrzezenie:

Kod
Warning: Unknown: Your script possibly relies on a session side-effect which existed until php 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0


Moze ktos wie jak sobie z tym poradzic . Od razu wspomne ze nie mam dostepu do konfigoracji serwera.
Go to the top of the page
+Quote Post

Posty w temacie


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: 22.08.2025 - 05:20