Current location: Hot Scripts Forums » Programming Languages » PHP » Cannot send session cache limiter???


Cannot send session cache limiter???

Reply
  #1 (permalink)  
Old 11-17-03, 12:23 PM
warsome warsome is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Cannot send session cache limiter???

THE ERROR:
-------------
Warning: Cannot send session cache limiter - headers already sent (output started at /home/virtual/site13/fst/var/www/html/main.php:2) in /home/virtual/site13/fst/var/www/html/includes/session_register.php on line 4

Line its talking about:
session_register('server_id');
session_register('reg_username');
session_register('reg_pass');
session_register('master_check_login');


This inst the only place i have the error. it seems to be popping up in a few places...


THE ERROR 2:
-------------
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site13/fst/var/www/html/main.php:2) in /home/virtual/site13/fst/var/www/html/includes/ig_header.php on line 47

Line its talking about:
{
Header("Location: logout.php");
exit;
}
Reply With Quote
  #2 (permalink)  
Old 11-17-03, 12:40 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
always when you want to use header(); , you have to call it before any outputs ..
you have to register sessions before any outputs , sessions are sent with header so they need to be sent first .. also try to use the new session register format and deal with them as any GLOBAL arrays .. I am talking like registering session like this :
PHP Code:

$_SESSION['server_id']='whatever'
and for error 2 it seems that there is an output in line 2 in main.php so you can't send any header ..

from its name header only comes first ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 11-18-03, 02:36 AM
warsome warsome is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
What do you mean by

"you have to register sessions before any outputs , sessions are sent with header so they need to be sent first"

what do i need to do for this?

I'V sooo done this all before, just it was a year ago and i forgot.
and ill try useing that new command... but i dont see how to send with the header, as they are the first lines of code... (before the html)
Reply With Quote
  #4 (permalink)  
Old 11-18-03, 05:17 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
"you have to register sessions before any outputs , sessions are sent with header so they need to be sent first"
I mean use session_register() just after header() ..
just like header(), before any outputs ...

Quote:
but i dont see how to send with the header
you don't have to , because they are sent automaticly..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
session help darkcarnival PHP 5 05-09-05 12:40 AM
Script to send to all userID of a particular domain. etegration Script Requests 2 11-28-03 05:27 AM
Howto send asynchonous POST?! matsnas ASP 3 08-21-03 09:55 AM
send email via local intranet superman PHP 3 06-29-03 12:20 PM


All times are GMT -5. The time now is 05:51 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.