Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP][MYSQL] Skrypt sesji - ciągle generuje nową sesję
Forum PHP.pl > Forum > Przedszkole
infoo1
http://wklej.org/id/31561/ (daję tam, bo tu jest jakieś ograniczenie długości postu do -1 znaku (no dobra, do 1 znaku (a tak na poważnie, to po prostu zdecydowanie za małe na kod)))
Ciągle generuje nową sesję (a raczej co drugi raz)(bo pojawia się nowy rekord w bazie). Dlaczego?
Oprócz tego za 1, 3, 5 itd. odświeżeniem daje to:
Cytat
[Debug] PHP Notice: in file D:\www\includes\class_db.php on line 30: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
Something is wrong in your syntax obok '' w linii 1[Debug] PHP Notice: in file D:\www\includes\class_session.php on line 163: Cannot modify header information - headers already sent by (output started at D:\www\includes\error.php:8)
[Debug] PHP Notice: in file D:\www\includes\class_main.php on line 15: Cannot modify header information - headers already sent by (output started at D:\www\includes\error.php:8)
, a za 2, 4, 6 itd.:
Cytat
[Debug] PHP Notice: in file D:\www\includes\class_db.php on line 30: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
Something is wrong in your syntax obok '' w linii 1[Debug] PHP Notice: in file D:\www\includes\class_session.php on line 163: Cannot modify header information - headers already sent by (output started at D:\www\includes\error.php:8)
[Debug] PHP Notice: in file D:\www\includes\class_session.php on line 61: Cannot modify header information - headers already sent by (output started at D:\www\includes\error.php:8)
[Debug] PHP Notice: in file D:\www\includes\class_session.php on line 24: Cannot modify header information - headers already sent by (output started at D:\www\includes\error.php:8)
[Debug] PHP Notice: in file D:\wwwclass_db.php on line 30: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
Something is wrong in your syntax obok '' w linii 1[Debug] PHP Notice: in file D:\www\includes\class_user.php on line 60: Undefined index: user_auth
Ten błąd MySQL jest przez to, że $session->get_user_id(); daje pustkę.

Edit:
A do bazy rekord dodaje też co drugie odświeżenie.
Kildyt
Rozumiem, że załadowałeś sesje poprzez session_start?
infoo1
Nie, to sesje na bazie.

Już przerobiłem i działa.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.