khalilov 0 Report post Posted September 25, 2008 I just got hosted and i am everything is working fine, but i got this in one of the pages: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/economy.php:4) in /home/khalilov/public_html/topview.php on line 9 I am used include inside a php file, the file i included had session_start() and so did the main file i used include in, is that a problem? if not whats the reason of this error? Share this post Link to post Share on other sites
toby 0 Report post Posted September 25, 2008 Put all session_ and cookie_ stuff before any html or blank lines. If this doesn't make sense, it's only ten lines so just post them for our help. Share this post Link to post Share on other sites
khalilov 0 Report post Posted September 25, 2008 <html><link rel="stylesheet" type="text/css" href="look.css" /><b><?phpsession_start(); i change it to<?php session_start();?><html><link rel="stylesheet" type="text/css" href="look.css" /><b><?php and it gave Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/economy.php:4) in /home/khalilov/public_html/topview.php on line 1 note that i used session_start() when the player logs in, and i put it in the begining of every php scrip, perhaps thats the issue?I doubt it though cuz everytime i remove the session_start nothinh shows since i use $_SESSION['..'] to get info, so iam guessing its needed so that you can keep reading variables stored on login Share this post Link to post Share on other sites
pyost 0 Report post Posted September 25, 2008 Well... Take a look at economy.php, line 4 - that's where the problem is Share this post Link to post Share on other sites
Eggie 0 Report post Posted September 26, 2008 yeah...you should check economy.php for that error since it says output started at /home/khalilov/public_html/economy.php:4 Share this post Link to post Share on other sites
khalilov 0 Report post Posted September 26, 2008 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/militarytrain.php:5) in /home/khalilov/public_html/militarytrain.php on line 7 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/economy.php:4) in /home/khalilov/public_html/topview.php on line 9 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/economybuildings.php:4) in /home/khalilov/public_html/topview.php on line 9 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/workers.php:5) in /home/khalilov/public_html/topview.php on line 9 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/militarytrain.php:5) in /home/khalilov/public_html/militarytrain.php on line 7 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/militaryresearch.php:5) in /home/khalilov/public_html/militaryresearch.php on line 7 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/khalilov/public_html/armies.php:5) in /home/khalilov/public_html/armies.php on line 7 Its happening everywhere O.o, all pages have include('topview,php'), in top view i use sessionstart, and then i also use it at the lines showing in error ,could that be the problem?economy.php<html><link rel="stylesheet" type="text/css" href="look.css" /><body><?phpinclude('topview.php');include('leftmenu.php');include('economystatus.php');?></body></html> Iam lost =( Share this post Link to post Share on other sites
toby 0 Report post Posted September 26, 2008 Anything involving, including asking for in includes, anything to do with sessions, cookies, headers, redirects ALL need to be before any html or white space. Share this post Link to post Share on other sites
khalilov 0 Report post Posted September 26, 2008 Thx its working now =), i thought you were only refering the topview script but you meant all other scripts that had topview included.thx =) Share this post Link to post Share on other sites