Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/02/2014, 10:43
Avatar de andres_15_
andres_15_
 
Fecha de Ingreso: septiembre-2008
Ubicación: Cali
Mensajes: 232
Antigüedad: 15 años, 7 meses
Puntos: 7
Respuesta: Error: Cannot modify header information - headers already sent by...

Cita:
Iniciado por Eleazan Ver Mensaje
Ese archivo es visMenu.php? o.O

El error es "claro". Empiezas un output antes de modificar los header en el archivo "conCuentas.php", en la linea 104.

¿Podriamos ver los archivos implicados? :P
Claro amigo, me ayudarias mucho con eso. El archivo que vista es el visMenu.php y este es el conCuentas.php

Código PHP:
<?php
if(!isset($_SESSION)){
session_start();
}
require_once(
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/views/Utils/utiVerificaInicioSession.php');
/**
 * @author: John Jairo Cortes Garcia - [email protected]
 * @version: 1.0.0
 * Fecha - 24-03-2012
 */
require_once ($_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/utils/inputfilter-2005-05-09/class.inputfilter.php5');
//se instancia la clase
$obFilter = new InputFilter();
//Variable Global $_POST libre de XSS e Inyecciones SQL
$_POST $obFilter->process($_POST);
$_GET  $obFilter->process($_GET);

$strPath='';
if(isset(
$_GET['actionajax']) || isset($_POST['actionajax'])){
    
$strPath .= $_SESSION['CONFIG_SITE']['PATH_APLICATION'];
}else{
    
$strPath .= $_SESSION['CONFIG_SITE']['PATH_APLICATION'];
}
/// include de los objetos necesarios
require_once ($_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_dao/dao_cuentas.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_vo/vo_cuentas.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_dao/dao_cuentas_ingreso.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_vo/vo_cuentas_ingreso.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_dao/dao_salas_ingresos.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_vo/vo_salas_ingresos.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/utils/utiSetVarSession.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_dao/dao_cuentas_puntos.php');
require_once (
$_SESSION['CONFIG_SITE']['PATH_APLICATION'].'/aplication/model/cl_vo/vo_cuentas_puntos.php');
//
$actionBttn = (isset($_GET['actionBttn'])?$_GET['actionBttn']:(isset($_POST['actionBttn'])?$_POST['actionBttn']:""));
//////
if(isset($actionBttn)){
    switch(
$actionBttn){
        case 
'buscardatoscuentas':
            
$objDaoCuentas = new dao_cuentas();
            
$objVoCuentas  = new vo_cuentas();
            
            
$bolResultado false;
            
            
$objVoCuentas->set_id($_SESSION['CONFIG_USER']['ID_CUENTA']);
            
//
            
$objVoCuentas $objDaoCuentas->consulta_cuenta_by_codigo($objVoCuentas);
            
// buscamos los datos de los puntos
            
$objDaoCuentas_puntos = new dao_cuentas_puntos();
            
$objVoCuentas_puntos  = new vo_cuentas_puntos();
            
            
$objVoCuentas_puntos->set_id_cuentas($_SESSION['CONFIG_USER']['ID_CUENTA']);
            
            
$objVoCuentas_puntos $objDaoCuentas_puntos->consulta_puntos_by_idcuentas($objVoCuentas_puntos);
            
//
            
echo json_encode(array(
                
"codigo"=>$objVoCuentas->get_id(),
                
"usuario"=>$objVoCuentas->get_usuario(),
                
"passwd"=>$objVoCuentas->get_passw(),
                
"prim_nombre"=>$objVoCuentas->get_primer_nombre(),
                
"seg_nombre"=>$objVoCuentas->get_segundo_nombre(),
                
"prim_app"=>$objVoCuentas->get_primer_apellido(),
                
"seg_app"=>$objVoCuentas->get_segundo_apellido(),
                
"email"=>$objVoCuentas->get_email(),
                
"tel_casa"=>$objVoCuentas->get_telefono_casa(),
                
"tel_movil"=>$objVoCuentas->get_telefono_movil(),
                
"puntos"=>$objVoCuentas_puntos->get_puntos()
            ));
            break;
        case 
'guardar':
            
$objDaoCuentas = new dao_cuentas();
            
$objVoCuentas  = new vo_cuentas();
            
            
$bolResultado false;
            
            
$objVoCuentas->set_id($_POST['hdncodigo']);
            
            
/// consultamos los datos antes de actualizar
            
$objVoCuentas_cons  = new vo_cuentas();
            
$objVoCuentas_cons  $objDaoCuentas->consulta_cuenta_by_codigo($objVoCuentas);
            
/// verificamos si hay que cambiar el password
            
if(isset($_POST['chkpass'])){
                
$strPass md5($objVoCuentas_cons->get_usuario()."_".$_POST['txtPass']);
            }else{
                
$strPass $objVoCuentas_cons->get_passw();
            }
            
            
$objVoCuentas->set_passw($strPass);
            
            
$objVoCuentas->set_primer_nombre($_POST['txtPrimNombre']);
            
$objVoCuentas->set_segundo_nombre($_POST['txtSeguNombre']);
            
$objVoCuentas->set_primer_apellido($_POST['txtPrimApp']);
            
$objVoCuentas->set_segundo_apellido($_POST['txtSeguApp']);
            
$objVoCuentas->set_telefono_casa($_POST['txtTelefonoCasa']);
            
$objVoCuentas->set_telefono_movil($_POST['txtTelefonoMovil']);
            
            
$objVoCuentas->set_modificado_por($_SESSION['CONFIG_USER']['ID_CUENTA']);

            
            
$bolResultado $objDaoCuentas->guarda_cuentas($objVoCuentas);
            if(!
$bolResultado)
            {

                
header("location: ".$_SESSION['CONFIG_SITE']['URL_SITE'].'/index.php?module=Usuarios&action=MisDatos&r=er');
            }

            else
            {    
                
header("location: ".$_SESSION['CONFIG_SITE']['URL_SITE'].'/index.php?module=Usuarios&action=MisDatos&r=ok');
            }

                break;
            
        case 
'buscarultcx':
            
$bolResultado false;
            
/// buscamos las sesiones abiertas en salas y las cerramos
            
$objDaoSalasIngreso = new dao_salas_ingresos();
            
$objVoSalasIngreso = new vo_salas_ingresos();
            
$obj_set_var_ssn = new utisetVarSession();

            
// consultamos el registro abierto
            
$objVoSalasIngreso->set_id_cuentas($obj_set_var_ssn->get_ssn_id_cuenta());
            
            
$objVoSalasIngreso_activo = new vo_salas_ingresos();
            
$objVoSalasIngreso_activo $objDaoSalasIngreso->consulta_salas_ingreso_x_idcuentas_activo($objVoSalasIngreso);
            
// verificamos si hay q actualizar
            
if($objVoSalasIngreso_activo!=null){
                
// set valores
                
$objVoSalasIngreso->set_estado("S");
                
$objVoSalasIngreso->set_id($objVoSalasIngreso_activo->get_id());
                
$bolResultado $objDaoSalasIngreso->update_salas_ingreso_x_id($objVoSalasIngreso);
                if(!
$bolResultado){
                    echo 
json_encode(array(
                        
"bolresultado"=>"false"
                    
));
                }
            }
            
/////////////////////////////////
            
$objDaoCuentasIngreso = new dao_cuentas_ingreso();
            
$objVoCuentasIngreso = new vo_cuentas_ingreso();
            
            
            
            
$objVoCuentasIngreso->set_id_cuentas($obj_set_var_ssn->get_ssn_id_cuenta());
            
            
$arrDatos $objDaoCuentasIngreso->consulta_cuenta_by_id_cuentas($objVoCuentasIngreso);
            
            
            
$objVoCuentasIngreso_ult $arrDatos[(count($arrDatos)-1)];
            
$objVoCuentasIngreso_pen = isset($arrDatos[(count($arrDatos)-2)])?($arrDatos[(count($arrDatos)-2)]):null;
            
            echo 
json_encode(array(
                
"fecha_ult_ingreso"=>$objVoCuentasIngreso_ult->get_fecha_ingreso(),
                
"fecha_pen_ingreso"=>($objVoCuentasIngreso_pen!=null?$objVoCuentasIngreso_pen->get_fecha_ingreso():'null'),
                
"fecha_pen_salida"=>($objVoCuentasIngreso_pen!=null?$objVoCuentasIngreso_pen->get_fecha_salida():'null')
            ));
            break;
    }
}
?>
Se supone que el error esta en esta linea:

Código PHP:
 header("location: ".$_SESSION['CONFIG_SITE']['URL_SITE'].'/index.php?module=Usuarios&action=MisDatos&r=ok');