Hola que tal comunidad soy nuevo en este foro les doy un cordial saludo, abro mi tema porq tengo algunos dias con un error y no se como resolverlo espero me puedan ayudar e aqui mi problema:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\index.php:1) in C:\xampp\htdocs\index.php on line 43
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:1) in C:\xampp\htdocs\index.php on line 43
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\index.php:1) in C:\xampp\htdocs\index.php on line 78
mis lineas de codigo son estas del index:
<?php
// Validate request to login to this site.
if (!isset($_SESSION)) {
session_start(); <------ Linea 43
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['usuario'])) {
$loginUsername=$_POST['usuario'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "nivel";
$MM_redirectLoginSuccess = "Administrador/inicio.php";
$MM_redirectLoginSuccess2 = "Consulta/inicio.php";
$MM_redirectLoginSuccess3 = "Supervisor/inicio.php";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_Activos3, $Activos3);
$LoginRS__query=sprintf("SELECT usuario, clave, nivel FROM usuarios WHERE usuario=%s AND clave=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $Activos3) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'nivel');
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup; <------ Linea 78
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
if($loginStrGroup==1) { header("Location: " . $MM_redirectLoginSuccess ); }
if($loginStrGroup==2) { header("Location: " . $MM_redirectLoginSuccess2 ); }
if($loginStrGroup==3) { header("Location: " . $MM_redirectLoginSuccess3 ); }
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
Bueno espero me puedan ayudar saludos y de antemano gracias