sessions do not register

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
feiticeir0
Forum Newbie
Posts: 8
Joined: Tue Nov 05, 2002 1:33 pm
Location: Castelo Branco, Portugal

sessions do not register

Post by feiticeir0 »

Hi!

i'm having problems when working with cookies and sessions.

when i write the code for register a simple session, when i try to execute the page, the answer is:

cannot send http headers - alredy sent by (file name) !!

HELP - urgent

thanks in advance
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

read Sticky: Before Post Read: Warning: Cannot add header information
session support uses cookies by default. cookie data is sent within the response header.
User avatar
phpcoder
Forum Contributor
Posts: 158
Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK

Post by phpcoder »

i think u r sending something else before sending cookie or registering session.
When u r sending response to user u have to first send cookie or session register before sending anything to user.
:lol:
Post Reply