Jump to content
MakeWebGames

Recommended Posts

Posted

Hey guys..

I have a small problem..

At top of every page this error gets showed:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/andersen/public_html/login/index.php:10) in /home/andersen/public_html/login/globals.php on line 2

The line the error code is showing is this:

session_start();

Anyone able to help out?

Posted

It means that another page has already got session_start(); in it. For example say your globals has it and you have this in a page:

 

<?php
include "globals.php";
session_start();
blah blah

 

That will try to send out 2 session starts because 1 is in your globals.

Posted

It doesn't always mean he has 2 session starts. It could also mean that he has in echo, print, header, or another function that outputs something to the page written somewhere after the session start. put ob_start(); before everything on the main page which has the includes, and that should fix it.

If not tell us what you have on line 10 in publichtml/login/index.php.

And what you have on line 2 of login/globals.php.

Posted

I got it fixed.. Im so embarrased i didnt notice myself..

But ron the line above include "header.php" i had wrote include "style.css"..lol

Thanks anyways guys, i got it fixed :)

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.   Paste as plain text instead

  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...