riddhi Posted April 25, 2007 Share Posted April 25, 2007 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at f:\program files\easyphp1-8\www\plaincart\add_cart.php: in f:\program files\easyphp1-8\www\plaincart\add_cart.php on line 14 for the code :- session_start(); print_r ($_SESSION['productId']); Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/ Share on other sites More sharing options...
MadTechie Posted April 25, 2007 Share Posted April 25, 2007 please read the header post Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-237993 Share on other sites More sharing options...
riddhi Posted April 25, 2007 Author Share Posted April 25, 2007 But in that entire script i haven't used header Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-237997 Share on other sites More sharing options...
trq Posted April 25, 2007 Share Posted April 25, 2007 Did you read the link? Starting a session sends a header to the client. You cannot send a header once the initial headers have been sent. You need to call session_start() before any output to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-238000 Share on other sites More sharing options...
riddhi Posted April 25, 2007 Author Share Posted April 25, 2007 I have tried to understand but at present sound too difficult for a novice like me ???. I am trying to pass the array between the script but without any sucess. Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-238179 Share on other sites More sharing options...
MadTechie Posted April 25, 2007 Share Posted April 25, 2007 please post lines 8 ) and 14 ) Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-238187 Share on other sites More sharing options...
riddhi Posted April 25, 2007 Author Share Posted April 25, 2007 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at f:\program files\easyphp1-8\www\plaincart\add_cart.php: in f:\program files\easyphp1-8\www\plaincart\add_cart.php on line 14 here is the required code :- Code: session_start(); print_r ($_SESSION['productId']); Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-238480 Share on other sites More sharing options...
MadTechie Posted April 25, 2007 Share Posted April 25, 2007 is print_r ($_SESSION['productId']); line 14 of add_cart.php ? if so comment it out ie //print_r ($_SESSION['productId']); Quote Link to comment https://forums.phpfreaks.com/topic/48605-why-is-the-warning-message/#findComment-238489 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.