Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/04/2005, 17:28
Avatar de Galled
Galled
 
Fecha de Ingreso: marzo-2005
Ubicación: Lima
Mensajes: 254
Antigüedad: 19 años
Puntos: 0
Error en Session_start()

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/local/apache2/htdocs/siscpa/ArchivosPHP/page1.php:9) in /usr/local/apache2/htdocs/siscpa/ArchivosPHP/page1.php on line 12

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/local/apache2/htdocs/siscpa/ArchivosPHP/page1.php:9) in /usr/local/apache2/htdocs/siscpa/ArchivosPHP/page1.php on line 12

Tengo estos mensajes de error que me aparecen y con el siguiente codigo:

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
// page1.php

session_start();

echo 
'Welcome to page #1';

$_SESSION['favcolor'] = 'green';
$_SESSION['animal']  = 'cat';
$_SESSION['time']    = time();

// Works if session cookie was accepted
echo '<br /><a href="page2.php">page 2</a>';

// Or maybe pass along the session id, if needed
echo '<br /><a href="page2.php?' SID '">page 2</a>';
?> 
</body>
</html>
que esta mal?