Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/04/2012, 19:02
judio22
 
Fecha de Ingreso: noviembre-2011
Ubicación: Almeria
Mensajes: 43
Antigüedad: 12 años, 6 meses
Puntos: 0
Problema con Warning: session_start()

Hola a todos, tengo un problema que por mas que leo en el foro no le encuentro solucion. el mansaje de error es el siguiente:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/oryqclmk/public_html/crearentrada.php:1) in /home/oryqclmk/public_html/crearentrada.php on line 1

he leido que hay que quitar espacios antes de session_start() o incluso que sea la primera etiqueta del codigo, tambien que lo abra con el blog de notas y lo guarde...y la verdad ya no se que mas hacer. dejo tambien el codigo por si alguien quiere hechar un vistazo:

<?php
session_start();//iniciamos sesion
include("nosession.php");//comprobacion si la variable de sesion esta creada
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="css/estilo.css" />
<title>blogeando.net</title>

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26970838-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

</head>

<body>

<div class="container">

<div class="navigation">

<?php
$usuario=$_SESSION['user'];//coge el valor de la variable de sesion
include("navegacion.php");//menu
include("conexion.php");//nos conectamos a la base de datos
?>

</div>

<div class="main">

<div class="content">

<?php

mysql_select_db("proyecto");//selección de la base de datos con la que vamos a trabajar

$result = mysql_query("SELECT * FROM usuarios where direccion='$usuario'", $conexion);

while ($row = mysql_fetch_row($result))
{
$foto=$row[5];
$nombre=$row[0];
$apellidos=$row[1];
$sexo=$row[6];
$provincia=$row[9];

}
echo "<h2>".$nombre." ".$apellidos."</h2><br>";
echo "<p><img src=img/files/".$foto." height='166' Width='166'></p>";

//mensajes pendientes
$result = mysql_query("SELECT * FROM mensajes where destinatario='$usuario'", $conexion);

$sinleer=0;
while ($row = mysql_fetch_row($result))
{
$idleido=$row[4];

if ($idleido == 0)
{
$sinleer++;
}
}
echo "<p>mensajes sin leer: ".$sinleer;
echo "</p><hr>";
?>
<h3>Informacion personal</h3>
<ul>
<li><h3>Nombre:</h3><?php echo $nombre." ".$apellidos ;?></li>
<li><h3>Sexo:</h3><?php echo $sexo;?></li>
<li><h3>Provincia:</h3><?php echo $provincia;?></li>
<li><a href="perfil.php"><h3>Editar perfil</h3></a></li>

</ul>

<h3>Patrocinadores</h3>
<?php
include("patrocinadores.php");//menu
?></div>

<div class="sidenav"><?php
if ($_POST)//comprueba si la variable post existe
{
$titulo=stripslashes(trim($_POST['titulo'])); // Recoge titulo
$contenido=stripslashes(trim($_POST['content'])); // Recoge contenido
$tema=$_POST['categoria']; // Recoge categoria
$direccion=$_SESSION['user'];

$fecha = time();
$fechaformato = date("d/m/Y",$fecha);

include("conexion.php");//nos conectamos a la base de datos

$sentencia="INSERT INTO `blog`(`titulo`, `contenido`, `tema`, `direccion`, `foto`, `fecha`) VALUES ('$titulo','$contenido','$tema','$direccion','$ima gen','$fechaformato')";

//Ejecuta la sentencia
if (mysql_query($sentencia,$conexion))
{
header ("Location: usuario.php");
}
else
{
$destinatario = "[email protected]";
$asunto = "Error creando entrada";
$cuerpo = $direccion;

//para el envío en formato HTML
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

//dirección del remitente
$headers .= "From: Blogeando <[email protected]>\r\n";

//dirección de respuesta, si queremos que sea distinta que la del remitente
//$headers .= "Reply-To: [email protected]\r\n";

//ruta del mensaje desde origen a destino
//$headers .= "Return-path: [email protected]\r\n";

//direcciones que recibián copia
//$headers .= "Cc: [email protected]\r\n";

//direcciones que recibirán copia oculta
$headers .= "[email protected]\r\n";

mail($destinatario,$asunto,$cuerpo,$headers);
echo "<center><br><H2>Error al crear entrada.</H2>";//No se CREO
echo "<a href='crearentrada.php'>Volver</a></center>";
}
}

else
{
include("ckeditor/ckeditor.php");

// Create class instance.
$CKEditor = new CKEditor();

// Do not print the code directly to the browser, return it instead
$CKEditor->returnOutput = true;

// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
// $CKEditor->basePath = '/ckeditor/'
// If not set, CKEditor will try to detect the correct path.
$CKEditor->basePath = 'ckeditor/';

// Set global configuration (will be used by all instances of CKEditor).
$CKEditor->config['width'] = 600;

// Change default textarea attributes
$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10);

// The initial value to be displayed in the editor.
$initialValue = 'Escribir articulo';

// Create first instance.
$code = $CKEditor->editor("content", $initialValue);
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<div class="maincontent">
<div class="top">
</div>
<div class="postform">
<form method="POST" action="#">
Titulo: <input type="text" name="titulo" size="50" maxlength="50" tabindex="1" id="postformtitle" value="<?php
if(isset($title2))
{
echo htmlentities($title2);
}
?>"/><br />
Contenido:<br />
<?php
echo $code;
?><br />
<label for="message">Categoria:</label><br/>
<select name="categoria" tabindex="3">
<option>Tecnologia</option>
<option>Cultura</option>
<option>Actualidad</option>
<option>Ocio</option>
</select>
<input type="submit" value="CREAR &raquo" class="button" tabindex="4"/>
<input type="hidden" name="sub" value="1" />

</form>
<?php
}
?>
</div>
</div>
</div><!--sidenav-->

<div class="clearer"><span></span></div>

</div>

<div class="footer">Carlos Del Campo Gallego
<div class="right"></div>

<div class="clearer"><span></span></div>

</div>

</div>

</body>

</html>



Gracias, seguire mirando por si encontrara la solucion. un saludo