![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 6.05.2014 Ostrzeżenie: (0%) ![]() ![]() |
Witam. nie wiem od czego zależy ale mam na stałe taki błąd
Cytat Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/botdorek/public_html/index.php:1) in /home/botdorek/public_html/index.php on line 2 Jak go naprawić ? |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 6 806 Pomógł: 1827 Dołączył: 11.03.2014 Ostrzeżenie: (0%) ![]() ![]() |
Usuń wszelkie znaki przed session_start().
Przed session_start() mają nie być wywoływane inne funkcje. Jeśli plik jest kodowany w UTF-8, to zmień na UTF-8 bez BOM. Ten post edytował trueblue 6.05.2014, 18:15:24 -------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 594 Pomógł: 122 Dołączył: 17.07.2005 Skąd: P-na Ostrzeżenie: (0%) ![]() ![]() |
nie wysyłać nic do przeglądarki zanim nie wywołasz funkcji session_start()
|
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 3 034 Pomógł: 366 Dołączył: 24.05.2012 Ostrzeżenie: (0%) ![]() ![]() |
bardziej znaki przed <?php, tzn konkretnie chodzi o to, że strona została już wygenerowana zanim stworzyłeś sesje, czyli tak jak napisał trueblue lub html, lub zwykłe echo, takie problemy to wczesne przedszkole, wiec nie ten dział
![]() |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 6.05.2014 Ostrzeżenie: (0%) ![]() ![]() |
Podam cały kod najlepiej, może ktoś znajdzie błą owy
Cytat <?php
session_start(); ob_start(); //echo '<pre>'; //print_r($_SESSION); //sleep(1); //echo '</pre>'; function getTime() { $a = explode (' ',microtime()); return(double) $a[0] + $a[1]; } $Start = getTime(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>BOT :: LipA</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Bot reklamujący www.sh.st/wAPyn"> <meta name="author" content="Nieznany - www.sh.st/wAPyn"> <link href="css/bootstrap.css" rel="stylesheet"> <style type="text/css"> body { padding-top: 20px; padding-bottom: 40px; } /* Custom container */ .container-narrow { margin: 0 auto; max-width: 800px; } .container-narrow > hr { margin: 30px 0; } /* Main marketing message and sign up button */ .jumbotron { margin: 60px 0; text-align: center; } .jumbotron h1 { font-size: 72px; line-height: 1; } .jumbotron .btn { font-size: 21px; padding: 14px 24px; } /* Supporting marketing content */ .marketing { margin: 60px 0; } .marketing p + h4 { margin-top: 28px; } </style> <script type="text/javascript" src="bbeditor/ed.js"></script> </head> <body> <div class="container-narrow"> <div class="masthead"> <ul class="nav nav-pills pull-right"> <li <?if(!$_GET['s']) echo 'class="active"';?>><a href="./">Reklamuj</a></li> <li <?if($_GET['s'] == 'lista') echo 'class="active"';?>><a href="./?s=lista">Konta</a></li> <li <?if($_GET['s'] == 'dodaj') echo 'class="active"';?>><a href="./?s=dodaj">Dodaj konto</a></li> <li <?if($_GET['s'] == 'historia') echo 'class="active"';?>><a href="./?s=historia">Historia</a></li> <li><a href="http://www.sh.st/wAPyn" target="_blank">MASTER BOOST</a></li> </ul> <li><a href="http://www.sh.st/wAPyn" target="_blank">MASTER BOOST</a></li> </div> <hr> <?php if(!function_exists('curl_init')){ echo '<div class="alert alert-error">Twój hosting nie obsługuje biblioteki cURL. Bot nie będzie działał.</div>'; } define('BOT', true); include ('config.php'); if(!$install){ include ('install.php'); }else{ include ('include/funkcje.php'); if(file_exists('install.php')){ unlink('install.php'); } ?> <div class="jumbotron"> <?php $site = $_GET['s']; if($site){ if(file_exists(dirname(__FILE__) . '/include/'.$site.'.php')){ include(dirname(__FILE__) . '/include/'.$site.'.php'); }else{ include ('include/glowna.php'); } }else{ include ('include/glowna.php'); } ?> </div> <?php }?> <hr> <div class="footer"> <p>© 2014 by <a href="gg:11665253">Aragog</a><br>Kodowanie:<a href="gg:34814170">LipA</a><br>Grafika:<a href="gg:43544927">Kir0</a> <br><?php $End = getTime(); echo "Czas wykonywania: ".number_format(($End - $Start),4)."s"; ?><br> Odwiedź forum <a href="http://http://www.sh.st/wAPyn" target="_blank">MASTER BOOST</a> </p> </div> </div> </body> </html> |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 3 034 Pomógł: 366 Dołączył: 24.05.2012 Ostrzeżenie: (0%) ![]() ![]() |
skoro jest ob_start to jeszcze by sie przydało http://www.php.net/manual/pl/function.ob-flush.php
http://www.php.net/manual/pl/function.ob-start.php patrz na przykład ![]() |
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 6.05.2014 Ostrzeżenie: (0%) ![]() ![]() |
Bardzo mi to dużo mówi te przykłady
![]() mógłbyś mi to po prostu wkleić w kod, tam gdzie powinno to być ? Ja w te klocki to cienki jestem ![]() |
|
|
![]()
Post
#8
|
|
Grupa: Zarejestrowani Postów: 1 240 Pomógł: 278 Dołączył: 11.03.2008 Ostrzeżenie: (0%) ![]() ![]() |
W jakim edytorze zapisywałeś ten plik?
Błąd jest na 80% z nagłówkami - musisz zapisać jako UTF-8 bez BOM jak napisał @trueblue. Ten post edytował markuz 6.05.2014, 18:56:49 -------------------- |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 6.05.2014 Ostrzeżenie: (0%) ![]() ![]() |
w notatniku to mam
wrzuciłem to na neta i daje link do tego http://speedy.sh/mn9cN/index.php Ten post edytował darosevic 6.05.2014, 19:01:41 |
|
|
![]()
Post
#10
|
|
Grupa: Zarejestrowani Postów: 1 240 Pomógł: 278 Dołączył: 11.03.2008 Ostrzeżenie: (0%) ![]() ![]() |
W takim razie błąd w 100% tkwi w nagłówku.
Pobierz np. Notepad++ I w menu w kodowaniu wybierz UTF-8 bez BOM - zapisz - i wszystko bd śmigać. -------------------- |
|
|
![]()
Post
#11
|
|
![]() Grupa: Zarejestrowani Postów: 3 034 Pomógł: 366 Dołączył: 24.05.2012 Ostrzeżenie: (0%) ![]() ![]() |
a na koniec wrzuć tam:
bo skoro już go używasz, to nie potrzebnie to trzyma w buforze... No a problemem bylo kodowane jak już powiedziano ![]() |
|
|
![]()
Post
#12
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 6.05.2014 Ostrzeżenie: (0%) ![]() ![]() |
Dzięki panowie za pomoc
![]() ![]() p.s: jeśli ktoś chce, abym komuś coś zareklamował, zapraszam na priv ![]() Ten post edytował darosevic 6.05.2014, 19:34:20 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 8.07.2025 - 02:38 |