Guest_imported
New member
- Jan 1, 1970
- 0
Hi I'm using session for user authentication. Originally the following line
<? include('authentication.php'); ?>
is included on each page I would like to protect. If a user accessed directly to a page without logging in, the script will redirect him/her to the appropriate login page. And vice versa the username and password of the user will be registered in session.
Please take a look at the below descriptions
===============Old files=======================
forum.php
download.php
===============================================
===============New files=======================
template.php?section=forum
template.php?section=download
===============================================
When I accessed directly to the file, say forum.php, the script just performed a fine work. But once I've used template.php l
(which is the template engine to construct the entire framework of my site -header,submenu,content,etc.) instead, it gets me errors like
Warning: Cannot send session cookie - headers already sent by (output started at c:\windows\login.php:7) in c:\windows\login.php on line 12
Warning: Cannot send session cache limiter - headers already sent (output started at c:\windows\login.php:7) in c:\windows\login.php on line 12
Could anyone please help me?Thank you very much.
<? include('authentication.php'); ?>
is included on each page I would like to protect. If a user accessed directly to a page without logging in, the script will redirect him/her to the appropriate login page. And vice versa the username and password of the user will be registered in session.
Please take a look at the below descriptions
===============Old files=======================
forum.php
download.php
===============================================
===============New files=======================
template.php?section=forum
template.php?section=download
===============================================
When I accessed directly to the file, say forum.php, the script just performed a fine work. But once I've used template.php l
(which is the template engine to construct the entire framework of my site -header,submenu,content,etc.) instead, it gets me errors like
Warning: Cannot send session cookie - headers already sent by (output started at c:\windows\login.php:7) in c:\windows\login.php on line 12
Warning: Cannot send session cache limiter - headers already sent (output started at c:\windows\login.php:7) in c:\windows\login.php on line 12
Could anyone please help me?Thank you very much.