Make sure you have session_start() before any output is sent to the browser,
also look for whitespace at the top of your file, sometimes a blank line or
a space can cause this error.

The reason you get this error is session_start() needs to add information to
the headers but because they have already been sent it can't.  You can
either put session_start before any output or you can enable output

If this doesn't work let me know.


-----Original Message-----
From: Kris Vose [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 10:42 AM
Subject: [PHP] register session

I am trying to register a session after verification of username and
It looks like this:
If ($name = $aa) && ($username = $ab)
echo "<script>window.location=\'admin_.php'\</script>";
echo "Your username/password is incorrect";
On each page that I want secure I include a script that checks for the
session_register().  It looks like this:
global $valid_user;
if (session_is_registered("valid_user"))
echo "you are registered";
echo "you are not registered";
This code is not working and it sends a warning message like this: Warning:
Cannot send session cache limiter - headers already sent (output started at
/var/www/focus-capital/BetterBus/1/admin_.php:7) in
/var/www/focus-capital/BetterBus/1/admin_.php on line 126
you are registered 1 - Send Mail
I have not used sessions before and I am wondering if I am doing some wrong
with the syntax?

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to