Re: [PHP] session trouble

2002-11-22 Thread Chris Shiflett
The best thing you can do is read the error message and examine the
line(s) in question.

You have output in file D:\sites\inc\register.inc on line 23. That
file is included in file D:\sites\uyelik\login.php on line 90. At
least, that's how I interpret that message.

The one thing the error message doesn't elaborate on that may help
you is that initializing a session causes some HTTP headers to be
sent. These must be sent prior to any output, so you either need to
eliminate the output the message refers to, use output buffering, or
move your session initializing nearer the beginning.

Hope that helps.

Chris

--- empty <[EMAIL PROTECTED]> wrote:

> Warning: Cannot send session cache limiter - headers already sent
> (output started at D:\sites\inc\register.inc:23) in
> D:\sites\uyelik\login.php on line 90

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] session trouble

2002-11-22 Thread Rich Gray
I don't know which version of PHP you are using but if v4.2.x upwards then
use session_start() and the $_SESSION[] superglobal array instead of
session_register(). Your warning is because you have either started output
of HTML or you have some blank lines in your PHP scripts before the session
related calls were made.

HTH
Rich
-Original Message-
From: empty [mailto:[EMAIL PROTECTED]]
Sent: 22 November 2002 14:22
To: [EMAIL PROTECTED]
Subject: [PHP] session trouble


hi guys ;

 I can't use session bla..as on my site.
PHP Code

...

Warning: Cannot send session cache limiter - headers already sent (output
started at D:\sites\inc\register.inc:23) in D:\sites\uyelik\login.php on
line 90

I cant understand and solve the warning message, what is it?

thanks all.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] session trouble

2002-11-22 Thread Van Andel, Robert
Make sure that you have nothing before 

mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] session trouble


hi guys ;

 I can't use session bla..as on my site.
PHP Code

...
 
Warning: Cannot send session cache limiter - headers already sent (output
started at D:\sites\inc\register.inc:23) in D:\sites\uyelik\login.php on
line 90

I cant understand and solve the warning message, what is it?

thanks all.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



 "The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers." 





Re: [PHP] Session Trouble

2002-10-24 Thread John Nichel
I don't know if it will solve your problem, but you may want to set the 
session variable to a boolean (true | false)

$_SESSION['voted'] = true;

Stephen wrote:
I'm trying to register a session for a poll by first opening the session (session_start()), then registering it like this:

$_SESSION['voted'] = "yes";

Problem is, when I check to see if the session is there:

if(isset($_SESSION['voted']))

I have it load up a page containing the poll results:

   

But it doesn't display it. It displays the default (which is the voting part). Any ideas why?

Thanks,
Stephen Craton
http://www.melchior.us
http://php.melchior.us




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Session Trouble

2002-10-24 Thread Stephen
That'd work nice for me too but I'm including a small table into the main
page toward the center. Forwarding them to the included page wouldn't work
in this case...


- Original Message -
From: "Peter Houchin" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 6:34 PM
Subject: RE: [PHP] Session Trouble


> > I'm trying to register a session for a poll by first opening the
> > session (session_start()), then registering it like this:
> >
> > $_SESSION['voted'] = "yes";
> >
> > Problem is, when I check to see if the session is there:
> >
> > if(isset($_SESSION['voted']))
> >
> > I have it load up a page containing the poll results:
> >
> > > include("poll_voted.php"); } ?>
> >
> > But it doesn't display it. It displays the default (which is the
> > voting part). Any ideas why?
>
> Stephen
>
> i have this sort of thing in my site .. what I suggest (and this works for
> me no problems) is
>
>  if (isset($_SESSION['voted'])){
> Header ("Location:poll_voted.php");
> }
> ?>
> I prefer to do it that way than to use includes, also you will have to
make
> sure this is at the very top of the page before any html tags etc are set.
>
> Cheers
> Peter
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Session Trouble

2002-10-24 Thread Peter Houchin
> I'm trying to register a session for a poll by first opening the
> session (session_start()), then registering it like this:
>
> $_SESSION['voted'] = "yes";
>
> Problem is, when I check to see if the session is there:
>
> if(isset($_SESSION['voted']))
>
> I have it load up a page containing the poll results:
>
> include("poll_voted.php"); } ?>
>
> But it doesn't display it. It displays the default (which is the
> voting part). Any ideas why?

Stephen

i have this sort of thing in my site .. what I suggest (and this works for
me no problems) is


I prefer to do it that way than to use includes, also you will have to make
sure this is at the very top of the page before any html tags etc are set.

Cheers
Peter


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php