Current location: Hot Scripts Forums » Programming Languages » PHP » Warning: session_register(): Cannot send session...


Warning: session_register(): Cannot send session...

Reply
  #1 (permalink)  
Old 10-29-04, 08:55 PM
imsilver imsilver is offline
New Member
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Warning: session_register(): Cannot send session...

What does this mean? i get this error on my php page,

Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at *url to my page*:1) in *url to my page* on line 5

i have been trying for houers passing a variable from one page to another, errors all the time.
Reply With Quote
  #2 (permalink)  
Old 10-30-04, 01:33 AM
4n7hr4x 4n7hr4x is offline
Banned
 
Join Date: Jun 2004
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
show me the script, it is happening because you must call session_start() before any info is sent to the browser through the script.
understand? so put session_start() and any session parameters at the top of your script before any info is sent to your browser, if you don't know what is sending info to your browser show me the script or just put session_start() right under the opening php tag
Reply With Quote
  #3 (permalink)  
Old 10-30-04, 01:43 AM
4n7hr4x 4n7hr4x is offline
Banned
 
Join Date: Jun 2004
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
just noticed that you aren't using session_start(), but the same applies with session_register() i believe
Reply With Quote
  #4 (permalink)  
Old 10-30-04, 04:02 PM
imsilver imsilver is offline
New Member
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
yeah im using session_register('variable'); and theres no need do include the "session_start();", right?
Reply With Quote
  #5 (permalink)  
Old 10-30-04, 05:08 PM
4n7hr4x 4n7hr4x is offline
Banned
 
Join Date: Jun 2004
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
year, just put above any info sent to browser
Reply With Quote
  #6 (permalink)  
Old 10-31-04, 01:41 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
you have to open the session before ANYTHING else!

for more info see:
http://www.xeweb.net/tutorials/index.php?x=sessions
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #7 (permalink)  
Old 10-31-04, 05:18 AM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
you have to open the session before ANYTHING else!
no... no... no... this statement should be, you have to open the session before sending the header or outputting something to the browser..
__________________
just an ignorant noob with moronic solution...
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
send mail problem jilshi JavaScript 0 03-01-04 09:48 PM
Script to send to all userID of a particular domain. etegration Script Requests 2 11-28-03 05:27 AM
Cannot send session cache limiter??? egzz PHP 1 11-20-03 12:53 PM
Cannot send session cache limiter??? warsome PHP 3 11-18-03 05:17 AM


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