Foros del Web » Programando para Internet » PHP »

Problemas Al Inicio De Sesion

Estas en el tema de Problemas Al Inicio De Sesion en el foro de PHP en Foros del Web. Que tal, tengo el siguiente script: carrito_lib //------------------------------------------------------------------ session_start(); $rfcf = file("miarchivo.txt"); /* file passed from the page of the site */ $rfcm = $rfcf[0]; ...
  #1 (permalink)  
Antiguo 23/02/2006, 12:26
 
Fecha de Ingreso: enero-2006
Mensajes: 25
Antigüedad: 18 años, 3 meses
Puntos: 0
Problemas Al Inicio De Sesion

Que tal, tengo el siguiente script:
carrito_lib
//------------------------------------------------------------------
session_start();
$rfcf = file("miarchivo.txt"); /* file passed from the page of the site */
$rfcm = $rfcf[0];
if (!isset($_SESSION[$rfcm])){
$_SESSION[$rfcm] = new carrito();
//------------------------------------------------------------------
y lo llamo de esta manera
<body>
<? include "../carrito_php/lib_carrito.php";?>
//-----------------------------------------------------------------
al parecer todo esta bien pero me da el siguiente el error,


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\Inetpub\wwwroot\sistema\cliente2.php:9) in c:\Inetpub\wwwroot\carrito_php\lib_carrito.php on line 59

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\Inetpub\wwwroot\sistema\cliente2.php:9) in c:\Inetpub\wwwroot\carrito_php\lib_carrito.php on line 59:





que puede ser que esta mal
  #2 (permalink)  
Antiguo 23/02/2006, 12:30
Avatar de claudiovega  
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 6 meses
Puntos: 11
Lo que está mal es que tienes, seguramente codigo html antes de usar session_start(), haz llamado a la función echo() o haz dejado algun espacio en blanco antes de <?php
  #3 (permalink)  
Antiguo 23/02/2006, 12:42
Avatar de mauled  
Fecha de Ingreso: marzo-2005
Ubicación: Cd. de México.
Mensajes: 3.001
Antigüedad: 19 años, 1 mes
Puntos: 33
Como dice claudiovega... No puede haber ninguna salida hacia el navegador ya sea un echo de php o etiquetas de html o javascript....
  #4 (permalink)  
Antiguo 23/02/2006, 13:03
 
Fecha de Ingreso: enero-2006
Mensajes: 25
Antigüedad: 18 años, 3 meses
Puntos: 0
listo, ya funciono, gracias, me sirvio mucho su ayuda
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:10.