Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
bom dia pessoal hospedei minha pagina que esta no seguinte link http://nova.silpa.com.br
e o erro a seguir aparece:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\web\localuser\silpa\www\nova\header.php:3) in D:\web\localuser\silpa\www\nova\header.phpon line 72
alguem saberia me explica como eu faço para resolver isso? Quando eu tento colocar usuário e senha tbm não funciona da mais este erro
Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in D:\web\localuser\silpa\www\nova\admin\index.php on line 124
Warning: Cannot modify header information - headers already sent by (output started at D:\web\localuser\silpa\www\nova\admin\index.php:3) inD:\web\localuser\silpa\www\nova\admin\index.php on line 139
O código do header é este será que alguem pode me ajudar:
<?php require_once('Connections/config.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['login'])) {
$loginUsername=$_POST['login'];
$password=$_POST['senha'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "index.php?topicos=nav/manuais";
$MM_redirectLoginFailed = "index.php?topicos=nav/home";
$MM_redirecttoReferrer = false;
mysql_select_db($database_config, $config);
$LoginRS__query=sprintf("SELECT user, senha FROM silpa_usersmanuais WHERE user=%s AND senha=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $config) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include"Connections/config.php";
$conexao = mysql_connect("$hostname_config","$username_config","$password_config")
or die(mysql_error());
$db = mysql_select_db("$database_config")
or die(mysql_error());
?>
<?php include"scripts/limita_palavra.php"; ?>
<?php
$pgatual = $_GET['topicos'];
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Silpa Peças e Equipamentos Rodoviários | <?php echo $pgatual;?> </title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="scripts/shadowbox-3.0.3/shadowbox.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="nav/timeline_silpa/css/style.css" type="text/css" media="screen" />
<link rel="shortcut icon" href="images/icones/logo-ico.ico" type="image/x-icon" />
<?php include"scripts.php"; ?>
</head>
<body>
<div id="box">
<div id="header">
<a href="index.php?topicos=nav/home">
<img src="images/header.png" alt="top"/>
</a>
</div><!--Header-->
<div id="menu">
<ul>
<li><a href="index.php?topicos=nav/home"><img src="images/icones/home.ico" width="25px" height="25px" alt="Home" />Home</a></li>
<li><a href="#"><img src="images/icones/produtos.ico" width="25px" height="25px" alt="Produtos" />Produtos</a>
<ul>
<li><a href="index.php?topicos=nav/page&pagina=eixos"><img src="images/icones/Eixo Tubular Roda Disco.ico" width="30px" height="30px" alt="Eixos" /><p>Eixos</p></a></li>
<li><a href="index.php?topicos=nav/page&pagina=freios"><img src="images/icones/0201.png" width="30px" height="30px" alt="Freios" /><p>Freios</p></a></li>
<li><a href="index.php?topicos=nav/page&pagina=suspensoes"><img src="images/icones/0301.png" width="30px" height="30px" alt="suspensões" /><p>Suspensões</p></a></li>
<li><a href="index.php?topicos=nav/page&pagina=componentes"><img src="images/icones/0401.png" width="30px" height="30px" alt="Componentes" /><p>Componentes</p></a></li>
</ul>
</li>
<li><a href="index.php?topicos=nav/maparepre"><img src="images/icones/representante.ico" width="25px" height="25px" alt="representantes" />Representantes</a></li>
<li><a href="uploads/download/Concessionarias Rev61.pdf"><img src="images/icones/concessionarias.ico" width="25px" height="25px" alt="concessionárias" />Concessionárias</a></li>
<li class="selected"><a href="index.php?topicos=nav/contato"><img src="images/icones/contato.ico" width="25px" height="25px" alt="contato" />Contato</a></li>
</ul>
<form name="search" action="index.php?topicos=nav/search" method="post">
<input type="text" name="pesquisa" value="Código ou Descrição" onfocus="this.value='';" onblur="this.value='Código ou Descrição'" />
<input type="submit" name="Procurar" value="Buscar" class="search_btn" />
</form>
</div><!--Menu-->
<div id="content">
Desde ja agradeço
OBS.;o código usado para fazer a autenticação dos contatos foi gerado pelo dreamweaver mesmo.
Carregando comentários...