Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at F:\Archivos de programa\Apache Group\Apache2\htdocs\pagina web\estructura.php:12) in F:\Archivos de programa\Apache Group\Apache2\htdocs\pagina web\aut_verifica.inc.php on line 119
Estoy trabajando con un autentificador de usuarios y ese mensaje me lo genera cuando un usuario accesa con nombre de user y password correctos.
Donde autentifico a un usuario y hago el inicio de sesiones es el sig. archivo:
Código PHP:
//"aut_verifica.inc.php
if (isset($_POST['user']) && isset($_POST['pass'])) {
............................................
session_name($usuarios_sesion);
session_start();
session_cache_limiter('nocache,private');
$_SESSION['usuario_id']=$usuario_datos['ID'];
$_SESSION['usuario_nivel']=$usuario_datos['nivel_acceso'];
$_SESSION['usuario_login']=$usuario_datos['usuario'];
$_SESSION['usuario_password']=$usuario_datos['pass'];
Header ("Location: $redir?mod=acceso");
exit;
} else {
//SE SUPONE QUE AQUI NO DEBERIA DE ENTRAR PORQUE "user" Y "pass" FUERON CORRECTOS.
//ESTA PARTE LA UTILIZO PARA QUE DESPUES DE HABER CERRADO LA SESIÓN
//Y UN USUARIO DE "ATRAS" CON SU NAVEGADOR PUES ME GENERE EL MENSAJE DE ACCESO INCORRECTO.
session_name($usuarios_sesion);
session_start();//ESTA LA LINEA DE ERROR QUE INDICA
//EL MENSAJE QUE EN UN PRINCIPIO MOSTRÉ.
if (!isset($_SESSION['usuario_login']) && !isset($_SESSION ['usuario_password'])){
session_destroy();
die ("Error cod.: 2 - Acceso incorrecto!");
exit;
}
}
Código PHP:
//"estructura.php"
<html>
<head>
<title>Mi sitio</title>
<!--<basefont color="#FFFFFF" face="Verdana" />-->
<style type="text/css">
<!--
.botones {...........}
-->
</style>
<script languaje="javascript">
function deshabilita(form)
{........................}
</script>
</head>
<body leftmargin="0" bottommargin="0" marginheight="0" marginwidth="0" topmargin="0">
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr><td width="21%" rowspan="2" background="images/fondo.jpg" align="center" valign="top"> <? include('aut_index.php') ?></td>
<td width="79%" align="left" valign="top" height="65"><?php include('superior.htm'); ?></td>
</tr>
<tr><td valign="top" height="935">
<? if (file_exists( $path_inicio )) include( $path_inicio );
else die('Error al cargar el módulo <b>'.$modulo.'</b>. No existe el archivo <b>'.$conf[$modulo]['archivo'].'</b>'); ?></td>
</tr>
</table>
</body>
</html>
Salu2
![apachar ojo](http://static.forosdelweb.com/fdwtheme/images/smilies/wink.png)