Frozen Life Posted January 22, 2011 Report Share Posted January 22, 2011 (edited) Lūūdzu palīdzat ar session_start(_); nekādīgi nesaprotu, kas pa problēmu tur ir :/ Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\xampp\htdocs\index.php:1) in D:\xampp\htdocs\index.php on line 5 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\index.php:1) in D:\xampp\htdocs\index.php on line 7 reku php scripts <?php include("config.php"); session_start(); if(isset($_GET['darbiiba']) and $_GET['darbiiba'] == 'iziet' and isset($_SESSION['ieligojies'])) { session_destroy(); header("location: index.php"); } if(isset($_POST['username']) and isset($_POST['password'])) { $username = quote_smart($_POST['username']); $password = quote_smart(md5($_POST['password'])); $result = mysql_query("SELECT COUNT(*) FROM lietotaji WHERE user = $username AND pass = $password"); if(mysql_result($result,0,'COUNT(*)') > 0) { #ieliek sesijā datus $_SESSION['ieligojies'] = 1; $id = mysql_result(mysql_query("SELECT id FROM lietotaji WHERE user = $username AND pass = $password"),0,'id'); $_SESSION['mans_id'] = $id; } } ?> Edited January 22, 2011 by Frozen Life Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 22, 2011 Report Share Posted January 22, 2011 Pirms attiecīgās funkcijas nedrīkst būt nekas cits kā PHP kods. Visdrīzāk Tev tur ir HTML kods. =] Quote Link to comment Share on other sites More sharing options...
Frozen Life Posted January 22, 2011 Author Report Share Posted January 22, 2011 Nav man tur nekā. Quote Link to comment Share on other sites More sharing options...
briedis Posted January 22, 2011 Report Share Posted January 22, 2011 Izlasi tak piesprausto topiku! Quote Link to comment Share on other sites More sharing options...
gta1151 Posted January 22, 2011 Report Share Posted January 22, 2011 Konvertē utf-8 bom paša sākuma pieraksti ob_start(); un beigās ob_end_flush(); cerams palīdzēs. Quote Link to comment Share on other sites More sharing options...
Frozen Life Posted January 22, 2011 Author Report Share Posted January 22, 2011 Man kaut kā pazuda viens errors un sesija sāka strādāt, bet otrs erors palika :( Un tas ir Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\index.php:1) in D:\xampp\htdocs\index.php on line 2 Quote Link to comment Share on other sites More sharing options...
briedis Posted January 22, 2011 Report Share Posted January 22, 2011 nu skaties vai faili saglabāti UTF-8 without BOM Quote Link to comment Share on other sites More sharing options...
Frozen Life Posted January 22, 2011 Author Report Share Posted January 22, 2011 Kā var apstīties ? :D Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 22, 2011 Report Share Posted January 22, 2011 Ar Notepad++, piemēram. Quote Link to comment Share on other sites More sharing options...
Frozen Life Posted January 22, 2011 Author Report Share Posted January 22, 2011 Liels paldies :* Tagad tikai ar notepad++ :D Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 22, 2011 Report Share Posted January 22, 2011 Ja Man būtu Notepad++ uz Debian... *doh* Quote Link to comment Share on other sites More sharing options...
Frozen Life Posted January 22, 2011 Author Report Share Posted January 22, 2011 Atkal problēma :D Tā, tad man ir tā es ieeju savā profilā pārmet viss notiek un nemet lauka, ja, bet kad es izeju man viņš iziet, bet kad uzspiežu SĀKUMS atkal viņš ir profilā, bet kad uzspiežu piemēram komentēt jaunumus, tad viņš vairs nav profilā :/ Var kāds ar šito palīdzēt ? O_O Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 22, 2011 Report Share Posted January 22, 2011 Fn session_start() ir jābūt katrā lapā, kura izmanto sesijas. =] Quote Link to comment Share on other sites More sharing options...
Frozen Life Posted January 22, 2011 Author Report Share Posted January 22, 2011 (edited) tu lkm mani nesaprati :D Kr4 nākat un spriežat paši kad ielagojaties mēģinat "Iziet" Un pēctam uzspiežat sākums. http://84.237.204.82/ user - test pass - testtest Edited January 22, 2011 by Frozen Life Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 22, 2011 Report Share Posted January 22, 2011 Man viss strādā. =] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.