you have to call session_start() before you send any output to the browser,
because it sends some headers.
"Phil Powell" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am now getting the following errors on every page:
>
> Warning: Cannot send session
OK thanx figured out a workaround in the meantime, I am setting and
retaining part of the session, but not all session variables, am I doing
this wrong???
$ip = $REMOTE_ADDR;
// Check for session - if session is set user has already logged in
session_start();
$login_state = &$_SESSION["logi
Make sure you aren't sending any HTML to the browser for any reason before
the session_start(); call.
Surefire way to prevent this error: place the following line as the first
line of PHP script you execute on every page:
ob_start();
Check out http://www.php.net/ob_start for details on what tha
I am now getting the following errors on every page:
Warning: Cannot send session cache limiter - headers already sent (output
started at c:\program files\apache
group\apache\htdocs\webmissions\picupload\miss_pic_upload.php:25) in
c:\program files\apache
group\apache\htdocs\webmissions\picupload\
I am now getting the following errors on every page:
Warning: Cannot send session cache limiter - headers already sent (output
started at c:\program files\apache
group\apache\htdocs\webmissions\picupload\miss_pic_upload.php:25) in
c:\program files\apache
group\apache\htdocs\webmissions\picupload\
In your example, simply place this line in your code (on *every* page you
want the session to be on):
session_name("HasLoggedIn");
session_register("username");
If your PHP was compiled with '--enable-trans-sid' you shouldn't have to
worry about anything else. PHP will automatically store the se
you have to put this on top of every of your pages:
-
session_name("hasLoggedIn");
$stuff = session_name();
session_start();
-
session_name first sets the name. then you call session_start which will
look for the
sessionid in ${sessio
Thanx, however, I cannot retain the session_name when I go to the next URL.
How do I retain the session_name especially when I have to use a form
method=POST?
I have a URL that will be the login
Once you login you will have a session (that works now)
That page with the session will have a form
session_name will retur the previos name of the session, so in your case
$stuff will contain "PHPSESSID"
and i think you have to call session_start(); before you do
$HTTP_SESSION_VARS["username"] = $username;
so perhaps this will work:
session_name("hasLoggedIn");
$stuff = session_name();
sessio
9 matches
Mail list logo