![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
Wszystko w sesjach mi działa prócz niszczenie sesji i wylogowywania po nieaktywności na stronie przez dany czas .
mam takie coś:
No i niestety nie wszystko mi styka. Wyświetla się biała strona (obsługa błędów od górnie wyłączona przez admina serwa). update: jeden błąd naprawiłem... jednak teraz wogule nie tworzy mi sesji, nie mogę się zalogować... Ten post edytował MajareQ 20.03.2008, 12:20:42 |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 51 Pomógł: 1 Dołączył: 4.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
Po pierwsze to bez wyświetlania błędów daleko nie "zajedziesz"
![]() Spróbuj:
lub
Jeżeli to nie pomoże radzę poszukać innego serwera lub samemu coś postawić. Co do Twojego tematu to domyślam się że chcesz żeby użytkownik został wylogowany po 15 min. I teraz zobacz: zapisujesz do sesji obecny czas
a chwile później sprawdzasz czy ten czas jest większy od 900........ warunek jest zawsze spełniony. Powinno być tak:
|
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
może za wcześnie dałem pomoga, bo ustawilem dla testu 5 sekund i nie zgasła mi sesja...
|
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 51 Pomógł: 1 Dołączył: 4.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
Myślę że jak pokażesz więcej kodu to bedzie łatwiej.....
|
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
Ten post edytował MajareQ 20.03.2008, 21:57:17 |
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 51 Pomógł: 1 Dołączył: 4.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
Ja napisałem troche innaczej:)
Ten post edytował ujex 20.03.2008, 22:02:33 |
|
|
![]()
Post
#7
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
Teraz w ogóle nie tworzy mi sesji...
Ten post edytował MajareQ 21.03.2008, 09:21:11 |
|
|
![]()
Post
#8
|
|
Grupa: Zarejestrowani Postów: 51 Pomógł: 1 Dołączył: 4.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
No ja nie wiem gdzie masz tworzoną sesje ja pomagam Ci zrobić skrypt który wyloguje użytkownika po pewnym czasie nieaktywności.
Podejrzewam że musisz mieć gdzieś skrypt który loguje użytkownika po podaniu loginu i hasła i w tym skrypcie zapewne ustawiasz $_SESSION['auth']=true; |
|
|
![]()
Post
#9
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
formularz odsyla sie do pliku który ustawie sesje auth na true i ustawia w bazie admina jako zalogowanego...
|
|
|
![]()
Post
#10
|
|
![]() Grupa: Zarejestrowani Postów: 2 592 Pomógł: 445 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
-------------------- |
|
|
![]()
Post
#11
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
nie działczy...
tzn najpierw byl blab i biala strona, naprawile literowke i strona sie wyswietla, ale po 5 sekundach nie gasnie sesja... |
|
|
![]()
Post
#12
|
|
![]() Grupa: Zarejestrowani Postów: 2 592 Pomógł: 445 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
Po co kombinujemy zmiane czasu na int
![]() Tyle, że:
-------------------- |
|
|
![]()
Post
#13
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
nie działczy?
biała strona |
|
|
![]()
Post
#14
|
|
![]() Grupa: Zarejestrowani Postów: 2 592 Pomógł: 445 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
-------------------- |
|
|
![]()
Post
#15
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
zapomniałeś ;
![]()
zaraz zobaczę czy działa no więc mam tak: Cytat if(session_cache_expire() + 2 < time()) { session_cache_expire(time() + 2); } else { $zalogujDB = mysql_query("UPDATE kt_admin SET zalogowany=0 WHERE login='".$_SESSION['login']."'"); $_SESSION['auth'] = FALSE; session_destroy(); } i nie działczy nawet jak dam tylko twój kod to wyskakuje: Cytat Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/data.php on line 14 Strict Standards: strftime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/data.php on line 57 25 marca 2008 Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/head.php on line 113 13:38 i Cytat Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/online.php on line 20 Strict Standards: mktime(): You should be using the time() function instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/online.php on line 20 Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/online.php on line 22 Strict Standards: mktime(): You should be using the time() function instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/online.php on line 22 Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /apache/apache-common/virt/virtuals/virt-645341/kt/engine/online.php on line 23 online: 1
|
|
|
![]()
Post
#16
|
|
Grupa: Zarejestrowani Postów: 82 Pomógł: 6 Dołączył: 23.03.2008 Skąd: Szczecin Ostrzeżenie: (0%) ![]() ![]() |
Może pomóc na Cytat Strict Standards: date():
-------------------- Pracuję na: Apache 2.2.4, MySQL 5.0.20a, PHP 5.3.0
|
|
|
![]()
Post
#17
|
|
![]() Grupa: Zarejestrowani Postów: 2 592 Pomógł: 445 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
Tak sie zastanawialem, zrobilem test u siebie, i teoretycznie powinno dzialac, moze w tych plikach data.php, albo funkcje.php jest cos co psuje....
-------------------- |
|
|
![]()
Post
#18
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
na strict data pomogło ustawienie
date_default_timezone_set('Europe/Warsaw'); obecnie mam: date_default_timezone_set('Europe/Warsaw'); setlocale(LC_ALL, 'pl_PL', 'pl', 'Polish_Poland.28592'); jednak scrict mktime dalej wywala... data.php
strona zaczyna mi sie sypać... ja podziekuje juz tych testów... |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 29.06.2025 - 08:12 |