setting session varibles in a function in an include file.
| From: | Keith Vance | Date: | Thu, 22 Jun 2000 17:35:42 +0000 |
| Subject: | setting session varibles in a function in an include file. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-2671@lists.php.net to get a copy of this message | ||
I am trying to run session_start, session_register with PHP4 by using a
function that is in an include function. The script keeps complaining about
"Warning: Cannot send session cookie - headers already sent by (output
started at test2.php:259) in test2.php on line 5
Warning: Cannot send session cache limiter - headers already sent by (output
started at test2.php:259) in test2.php on line 5"
This is the same script that I used when running PHP3 and running the
setcookie function without any problem. If I put the function in a file all
by itself, it works. There is nothing being printed to the browser prior to
calling the function that set the session stuff up. I don't get why it is
doing this. Has anyone else run into this problem?
Thanks,