0

Hello,
I googled about this problem and there are some suggestion to handle this.
i have tried but none solve my problem.
Errors are shown in line 3, 4 an 5 which code is like below:

ob_start(); 
//stop caching
header("Pragma: no-cache");
header("Cache: no-cache");
session_start();

can anyone help me with this

thank you
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\LessonPlan5\view.php:2) in C:\xampp\htdocs\LessonPlan5\constants.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\LessonPlan5\view.php:2) in C:\xampp\htdocs\LessonPlan5\constants.php on line 6

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\LessonPlan5\view.php:2) in C:\xampp\htdocs\LessonPlan5\constants.php on line 7

3
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by tulipputih
0

The message shows two different modules: view.php and constants.php. You have only shown code for one of them (presumably constants.php). You are probably doing an include for view.php and it appears that you are generating some kind of output from that module. Any kind of output prior to using a header statement will create an error. This can be as simple as a blank line. Anything at all will do it.

0

thanks for all suggestions.
I followed Chrishea's , and it works.

thanks again

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.