codeigniter - session_start(): Cannot send session cache limiter - headers > already sent -


i knew question may mark duplicate can't find answer duplicated post decided post in own.

i have pages session. after task, there button link controller called profileresult.php not have code yet surprising me got error.

here error.

a php error encountered

severity: warning

message: session_start(): cannot send session cache limiter - headers sent (output started @ /home3/oep2732/public_html/knowyourscore/application/controllers/profileresult.php:1)

filename: session/session.php

line number: 140

backtrace:

file: /home3/oep2732/public_html/knowyourscore/index.php line: 315 function: require_once

i created controller called profileresult.php

<?php defined('basepath') or exit('no direct script access allowed');  class profileresult extends ci_controller {       public function index()     {     }  }  ?> 

check controller file. remove empty space within file. example:

<?php defined('basepath') or exit('no direct script access allowed'); class profileresult extends ci_controller {     public function index() {          //your codes here     } } ?> 

in ide, if don't have comment on top of <?php tag, make sure in line 1. no empty spaces. same goes @ end of ?> tag. if have empty spaces after that. errors occurs. i've encounter same problem yours. tried check controller file aman maurya said, , yes have few lines of empty spaces. removed that, error not display anymore.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -