Jump to content

need help with 'include' function


gibigbig

Recommended Posts

help me, when i try to use the 'include' function in my scripts i get this error:

 

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/narutoking.com/index.php:3) in /home/www/narutoking.com/common.php on line 3

 

 

can someone please explain what this means. thanks a bunch

Link to comment
Share on other sites

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/narutoking.com/index.php:3) in /home/www/narutoking.com/common.php on line 3

 

Means, the file your trying to include, is trying to start a session "Session_Start()", after the page/script your including it in, has already sent data to the page, session_start() has to be the first thing on the page.

 

so, your best bet is to add in a <?php session_start(); ?> to the top of index.php

Link to comment
Share on other sites

session_start cannot be called if output has been sent to the browser.

 

IE:

 

<html>
<?php
session_start(); // error would be thrown here
?>

 

Instead do this:

<?php
session_start(); // No error should be thrown.
?>
<html>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.