Jump to content

Session Error


neugi

Recommended Posts

Hi,

 

i've got a strange problem:

 

i get this errors:

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at e:\Internet\pmtopagents\test.php:1) in e:\Internet\pmtopagents\test.php on line 3

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at e:\Internet\pmtopagents\test.php:1) in e:\Internet\pmtopagents\test.php on line 3

 

but in my test.php is nothing else than:

 

<?php
session_start();
?>

 

there is no space in front of <?php

 

where could be the error?

 

best

Link to comment
Share on other sites

Hi,

 

could it be that apache is adding a newline?

 

i'm shure that there is no newline char in front of my code and there is also no other include in the thest files. in the test file there are only 3 lines (see top, nothing else)

 

best

Link to comment
Share on other sites

IF (a big if) the error indicated that the session_start() in your posted code was on line 2, I would agree that you don't have any new-line in your file before the <?php tag. However, the error message does not lie.

 

I recommend that you open your file and back-space to the start of the file and the hit the delete key until the < character on the <?php tag is removed to make sure you don't have any characters before the <?php tag.

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.