Welcome Guest, Not a member yet? Register   Sign In
A PHP Error was encountered Severity: Warning Message: Cannot modify header
#3

(03-02-2015, 12:45 PM)gilfurtado Wrote: A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home1/grupoye1/public_html/teste/gestor/application/core/MY_Loader.php:1)

Filename: libraries/Session.php

Line Number: 687


I use xampp, as test server running on my computer.
in xampp this error does not occur!
This error only occurs on my server online, and I have no idea what might be.
someone help me?

You probably have error reporting turned off on your local environment and that's why you don't see the warning.

(03-29-2015, 09:37 AM)John_Betong Wrote: I would hazard a guess and say that you have called session_start() in your index.php file. Try searching for session_start() in your project.

A work-around is to modify the following file:

CodeIgniter_RCS/system/libraries/Session/Session.php


PHP Code:
// John added to try and see where the session_start() was already started
 
  if( isset($_SESSION) ) {
    
// $TMP = $this->uri->uri_string(); // PROBLEM
    
$TMP $_SERVER['REQUEST_URI'];
    
log_message('error''Session.php ALREADY STARTED: ' .$TMP); 

 
  }else{    
    
session_start();

 
  }//endif;            

 
  // ORIGINAL SCRIPT
 
    // session_start(); 

DO NOT EVER suggest for a user to modify a file under system/.
Reply


Messages In This Thread
RE: A PHP Error was encountered Severity: Warning Message: Cannot modify header - by Narf - 03-30-2015, 01:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB