php - Session start on an empty page causes an error; session_start(): Cannot send session cache limiter -
hi have php file empty , line of code in there
<?php session_start(); ?>
no html mark-up or php code besides code above.
on localhost doesn't trigger error, when it's on server , visit page, new line printed on error log says
[25-apr-2016 05:43:34 utc] php warning: session_start(): cannot send session cache limiter - headers sent (output started @ path/to/file.php:1) in /path/to/file.php on line 1
the server running apache , php 5.6 if that's relevant, i've tried deleting .htacces file in case what's causing problem still no luck.
can point me in right direction see may causing issue? thanks!
problem : there invisible characters inside code file.
solution : if want fix error here quick way : sure must using sort of code editor save php file encoding "utf-8 bom" , upload saved file site , access file , have no problem..!
reference url :
if doesn't solve problem use solution :
- make sure there absolutely no whitespace before
<?php
- put
session_start()
beforeob_start()
instead of after it. - if fails, try commenting out
session_start()
1 of includes might starting session, so:/** session_start(); **/
Comments
Post a Comment