Hi I'am beginner to php.I got problem in creating session in php file.I am developing my project using codeignitor and extjs as client side.I have created login form it should take the input from user and send it to login.php file in that file am trying to start session.But its giving errror this A PHP Error was encountered Severity: Warning Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\php\PEAR\JSON.php:1) Filename: controllers/login.php Line Number: 15 I thought that there may be error in session creation but when i used the same code in other file to create session thats working nicely.. session_start(); ------------ ------------ session_destroy(); Really I don't know why its giving like that please help me to get out of that error. thank you regards, harry
session_start() [function.session-start]: Cannot send session cache limiter - headers already sent Remove any space before using session functions.
Put session_start() at the very top of the page. If you have any output before session_start() it will not work and gives the Headers already sent message.