the apprentice webmaster Posted April 3, 2006 Share Posted April 3, 2006 here 's the full error message : [b]Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\xampp\htdocs\bpo\classes\clsMetaContent.php:45) in C:\Program Files\xampp\htdocs\bpo\includes\session.php on line 2Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\bpo\classes\clsMetaContent.php:45) in C:\Program Files\xampp\htdocs\bpo\includes\session.php on line 2Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\bpo\classes\clsMetaContent.php:45) in C:\Program Files\xampp\htdocs\bpo\includes\session.php on line 4[/b]and here 's my session.php script <?php[b]here's line -- > 2[/b] session_start();session_name( 'MyPHPSite' );[b]here's line 4 -->[/b]header( "Cache-conrol : private"); // Fix for IEfunction login_check(){if($_SESSION['login'] != TRUE ){myheader("Login Required!");include $_SERVER['DOCUMENT_ROOT']. '/bpo/html/forms/login_form.html'; footer(); exit(); } } function admin_check(){ if($_SESSION['admin_access']){ myheader("Access Denied!"); echo "<center>This Area is Restricte,For Website Administrators!"; footer(); exit(); } }?>i have been trying to found the problem but i can't so guys help me thx Quote Link to comment Share on other sites More sharing options...
alpine Posted April 3, 2006 Share Posted April 3, 2006 It is essential that nothing is outputted to the browser before session_start, so NO linebreaks and NO whitespace before session_start - and the php start tag absolute top-left corner__________________<?session_start();-------------------------- Quote Link to comment Share on other sites More sharing options...
the apprentice webmaster Posted April 3, 2006 Author Share Posted April 3, 2006 [!--quoteo(post=361097:date=Apr 2 2006, 11:44 PM:name=alpine)--][div class=\'quotetop\']QUOTE(alpine @ Apr 2 2006, 11:44 PM) [snapback]361097[/snapback][/div][div class=\'quotemain\'][!--quotec--]It is essential that nothing is outputted to the browser before session_start, so NO linebreaks and NO whitespace before session_start - and the php start tag absolute top-left corner__________________<?session_start();--------------------------[/quote]thx , so what should i remove from my script , i mean session.php Quote Link to comment Share on other sites More sharing options...
Guest footballkid4 Posted April 3, 2006 Share Posted April 3, 2006 If session.php is a child script (i.e. it is called via require() or include()) make sure the parent script has no output before session.php is executed. Quote Link to comment Share on other sites More sharing options...
the apprentice webmaster Posted April 3, 2006 Author Share Posted April 3, 2006 [!--quoteo(post=361108:date=Apr 3 2006, 12:29 AM:name=footballkid4)--][div class=\'quotetop\']QUOTE(footballkid4 @ Apr 3 2006, 12:29 AM) [snapback]361108[/snapback][/div][div class=\'quotemain\'][!--quotec--]If session.php is a child script (i.e. it is called via require() or include()) make sure the parent script has no output before session.php is executed.[/quote]thx you all guys , because of your reply i found where i made the the mistake instead of this on top of my script :[b] include $_SERVER['DOCUMENT_ROOT'].'/bpo/includes/session.php'; include $_SERVER['DOCUME NT_ROOT'].'/bpo/layout.php';[/b]i had this instead : i[b]nclude $_SERVER['DOCUMENT_ROOT'].'/bpo/layout.php'; include $_SERVER['DOCUMENT_ROOT'].'/bpo/includes/session.php';[/b]but guys now the logo doesn't show on top of the page , why is that , please help again guys thx ..... 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.