zvaigzniite Posted May 21, 2011 Report Share Posted May 21, 2011 (edited) Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:1) in C:\xampp\htdocs\index.php on line 2 uzmet shitadu errorinju ka lai salabo ir kaadi ieteikumi? mekleeju netaa neko ipashi neatradu index.php saakums <?php session_start(); if($_SERVER['REMOTE_ADDR']=="89.191.105.7") { ini_set('display_errors','On'); } else { ini_set('display_errors','Off'); } include("inc/config.php"); // Vajadzigais kverijs if(isset($_SESSION['member_id'])) { $member_id = $_SESSION['member_id']; $result = mysql_query("SELECT * FROM lietotaji WHERE member_id=$member_id"); } // Ja sanem pieprasijumu IELOGOTIES if(isset($_GET['id']) and $_GET['id'] == "login") { $logins = quote_smart($_POST['logins']); $parole = quote_smart($_POST['parole']); $blockq = 0; $result = mysql_query("SELECT * FROM lietotaji WHERE username=$logins and password=$parole and blocked=$blockq"); // Izvelkam lietotaja ID $row = mysql_fetch_row($result); $member_id = $row[0]; // Ja šads lietotajs pastav if(mysql_num_rows($result) == 1) { $_SESSION['member_id'] = $member_id; } else { $nav = "Nepareizs Logins/Parole vai arī akonts ir bloķēts!"; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Edited May 21, 2011 by zvaigzniite Quote Link to comment Share on other sites More sharing options...
Rincewind Posted May 21, 2011 Report Share Posted May 21, 2011 mekleeju netaa neko ipashi neatradu Tev nets nestrādā, pērc jaunu tīkla karti. http://php.lv/f/topic/7294-headers-already-sent/ Quote Link to comment Share on other sites More sharing options...
zvaigzniite Posted May 21, 2011 Author Report Share Posted May 21, 2011 Tev nets nestrādā, pērc jaunu tīkla karti. http://php.lv/f/topic/7294-headers-already-sent/ nestradaa izmeginaaju bet tas pats Quote Link to comment Share on other sites More sharing options...
Lancom Posted May 21, 2011 Report Share Posted May 21, 2011 Saglaba faili utf-8 formate bez nekadie utf-8 + bom es iesaku lietot phpDesigner 7 lai nomainitu kodejumu! Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 22, 2011 Report Share Posted May 22, 2011 Visticamāk pirms <?php ir kaut kādi lieki simboli... Quote Link to comment Share on other sites More sharing options...
Kemito Posted May 22, 2011 Report Share Posted May 22, 2011 Visticamāk pirms PHP ir likst HTML. Uzskrienam šitam virsū iespējams noder - http://lv.php.net/manual/en/function.ob-start.php Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 22, 2011 Report Share Posted May 22, 2011 Kemito, ob_start() galīgi nav problēmas risinājums! Tas neīstajā vietā tikai padarīs aplikāciju lēnāku. Kā jau teicu un Kemito Mani atkārtoja: "pirms <?php ir kaut kādi lieki simboli..."! Quote Link to comment Share on other sites More sharing options...
zvaigzniite Posted May 22, 2011 Author Report Share Posted May 22, 2011 Kemito, ob_start() galīgi nav problēmas risinājums! Tas neīstajā vietā tikai padarīs aplikāciju lēnāku. Kā jau teicu un Kemito Mani atkārtoja: "pirms <?php ir kaut kādi lieki simboli..."! un ka es varu pastities vai tur ir kaadi lieki simboli vai nav ar notepad ++ neko neuzraada Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 22, 2011 Report Share Posted May 22, 2011 Nu kā... Vai pirms <?php ir kaut kas? Pilnīgi jebkas? Kaut vai atstarpe vai jauna rindiņa... Jābūt šādi: Ja Tev tur viss ir kārtībā, tad skatīsimies, kas vēl tur nav labi! Quote Link to comment Share on other sites More sharing options...
zvaigzniite Posted May 22, 2011 Author Report Share Posted May 22, 2011 Nu kā... Vai pirms <?php ir kaut kas? Pilnīgi jebkas? Kaut vai atstarpe vai jauna rindiņa... Jābūt šādi: Ja Tev tur viss ir kārtībā, tad skatīsimies, kas vēl tur nav labi! nav tur nekaaa priekshaa vis ka vaig :) Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 22, 2011 Report Share Posted May 22, 2011 Vai kodējums failam ir UTF-8 without BOM? Quote Link to comment Share on other sites More sharing options...
Kemito Posted May 22, 2011 Report Share Posted May 22, 2011 daGrevi tas bija ieskats, lai apskatītu arī ko tādu, un problēmas izklāsts bija HTML pirms PHP. Quote Link to comment Share on other sites More sharing options...
mounkuls Posted May 22, 2011 Report Share Posted May 22, 2011 Nu bet headers already sent (output started at C:\xampp\htdocs\index.php:1) in C:\xampp\htdocs\index.php on line 2 norāda, ka tomēr kāds output ir jau bijis. Ne visos redaktoros var tos BOM simbolus redzēt, parastajā notepad pat neparādīs. Apskati lapas kodu ar Opera piemēram, tur pirms tā DOCTYPE arī uzpeldēs BOM visdrīzāk. Jāsaglabā faili ir kā UTF-8 without BOM, tad kam tādam būt nevajadzētu. P.S. sākumā tēmēju uz īpatnēju config.php, bet tad kļūda uzpeldētu citā rindiņā. Quote Link to comment Share on other sites More sharing options...
zvaigzniite Posted May 22, 2011 Author Report Share Posted May 22, 2011 Nu bet norāda, ka tomēr kāds output ir jau bijis. Ne visos redaktoros var tos BOM simbolus redzēt, parastajā notepad pat neparādīs. Apskati lapas kodu ar Opera piemēram, tur pirms tā DOCTYPE arī uzpeldēs BOM visdrīzāk. Jāsaglabā faili ir kā UTF-8 without BOM, tad kam tādam būt nevajadzētu. P.S. sākumā tēmēju uz īpatnēju config.php, bet tad kļūda uzpeldētu citā rindiņā. a kaa lai to BOM nonjem? :O Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 22, 2011 Report Share Posted May 22, 2011 Iekš Notepad++: 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.