Foros del Web » Programando para Internet » PHP »

Ayuda urgente porfavor

Estas en el tema de Ayuda urgente porfavor en el foro de PHP en Foros del Web. Hola, estoy desesperado con un problema que tengo, pues es que cuando veo la web en localhost las variables de seccion no me dan ningun ...
  #1 (permalink)  
Antiguo 29/08/2008, 18:09
Avatar de djdraft  
Fecha de Ingreso: abril-2008
Mensajes: 118
Antigüedad: 16 años
Puntos: 0
Pregunta Ayuda urgente porfavor

Hola, estoy desesperado con un problema que tengo, pues es que cuando veo la web en localhost las variables de seccion no me dan ningun error, pero cuando la subo al servidor las seciones me dan un error, me sale esto

Cita:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/minerafm/public_html/modulos/header.php:8) in /home/minerafm/public_html/ver.php on line 36
por favor ayuda no se que pasa con esto,

gracias de ante mano.
__________________
<img src="http://i280.photobucket.com/albums/kk197/djdraft22/DR.jpg">
  #2 (permalink)  
Antiguo 29/08/2008, 18:12
Avatar de kaninox  
Fecha de Ingreso: septiembre-2005
Ubicación: In my House
Mensajes: 3.597
Antigüedad: 18 años, 7 meses
Puntos: 49
Respuesta: Ayuda urgente porfavor

para empezar nos podria dar el codigo de la linea 36 para ser mas puntual, no somos adivinos y lo mas importante su titulo debe representar el problema pues amigo lease las normas de los foros.....
__________________
Gokuh Salvo al mundo. PUNTO!!!!
  #3 (permalink)  
Antiguo 29/08/2008, 18:17
Avatar de djdraft  
Fecha de Ingreso: abril-2008
Mensajes: 118
Antigüedad: 16 años
Puntos: 0
Respuesta: Ayuda urgente porfavor

ok perdona no sabia
aqui esta el codigo

Cita:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MINERAFM</title>
<link rel="icon" href="imagenes/animated_favicon1.gif" type="image/gif" >

<link rel="stylesheet" href="stylos/stylo_principal.css" type="text/css" />
<link rel="stylesheet" href="stylos/menu.css" type="text/css" />
<link rel="stylesheet" href="stylos/tags.css" type="text/css" />


</head>

<body>
<div class="wraper">
<div class="cabecera" style="text-align: center; background-color: #fff; padding:2px;">
<!-- ImageReady Slices (mineraproyect.psd) -->
<table id="Tabla_01" width="970" height="200" border="0" cellpadding="0" cellspacing="0" align=center>
<tr>
<td colspan="3">
<img src="imagenes/mineraproyect_01.jpg" width="970" height="51" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="imagenes/mineraproyect_02.jpg" width="533" height="149" alt=""></td>
<td>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="425" height="115">
<param name="movie" value="flash/banner.swf" />
<param name="quality" value="high"/>
<embed src="flash/banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="425" height="115"></embed>
</object></noscript>
</td>
<td rowspan="2">
<img src="imagenes/mineraproyect_04.jpg" width="12" height="149" alt=""></td>
</tr>
<tr>
<td>
<img src="imagenes/mineraproyect_05.jpg" width="425" height="34" alt=""></td>
</tr>
</table>
<!-- End ImageReady Slices -->



</div>

<div id="menu">
<ul id="navi">
<li><a href="index.php" title="VOLVER A LA PAGINA DE INICIO">INICIO</a></li>
<li><a href="index.php?id=noticias" title="Ultimas Noticias">NOTICIAS</a></li>
<li><a href="index.php?id=recientes" title="nacionales">RECIENTES</a></li>
<li><a href="index.php?id=contactos" title="nacionales">CONTACTANOS</a></li>
<li><a href="index.php?id=links" title="nacionales">LINKS</a></li>
</ul>
</div>


<?php

session_start();
if(!empty($_SESSION['usuario'])){

echo "<div class=\"menu_admin\"><h3>Menu de administracion</h3>";
echo "<a title=\"agregar nuevo articulo\" href=\"index.php?id=add\">AGREGAR NUEVO ARTICULO </a> | ";

echo "<a title=\"Usa esta opcion para borrar comentarios no deseados\" href=\"index.php?id=edit_seciones\">EDITAR SECCIONES</a> | ";

echo "<a title=\"muestra una lista de todos los articulos que estan en la base de datos para borrarlos\" href=\"index.php?id=add\">LISTAR TODOS LOS ARTICULOS</a> | ";

echo "<a title=\"Usa esta opcion para borrar comentarios no deseados\" href=\"index.php?id=mod_coment\">MODERAR COMENTARIOS</a> | ";

echo "<a title=\"!!Importante siempre cerrar seccion\" href=\"modulos/logout.php\">CERRAR SECCION</a></div>";
}
?>
__________________
<img src="http://i280.photobucket.com/albums/kk197/djdraft22/DR.jpg">
  #4 (permalink)  
Antiguo 29/08/2008, 18:40
Avatar de kaninox  
Fecha de Ingreso: septiembre-2005
Ubicación: In my House
Mensajes: 3.597
Antigüedad: 18 años, 7 meses
Puntos: 49
Respuesta: Ayuda urgente porfavor

mmmm podria mostrar su pagina header.php en la linea 8 ?
mire para ser exactos ese error se lo esta dando un header location en alguna parte en que ud lo puso y antes hay otra salida de codigo...

un header deber ir siempre al principio.....
saludos
__________________
Gokuh Salvo al mundo. PUNTO!!!!
  #5 (permalink)  
Antiguo 29/08/2008, 19:01
Avatar de djdraft  
Fecha de Ingreso: abril-2008
Mensajes: 118
Antigüedad: 16 años
Puntos: 0
Respuesta: Ayuda urgente porfavor

si pero el problema es que en la pc, osea en el localhost se me ve perfectamente pero cuando lo subo a mi servidor me da ese error
__________________
<img src="http://i280.photobucket.com/albums/kk197/djdraft22/DR.jpg">
  #6 (permalink)  
Antiguo 29/08/2008, 21:30
Avatar de Ronruby  
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: Ayuda urgente porfavor

Pon el codigo PHP antes de cualquier salida.
El session_start(); debe estar al principio.
  #7 (permalink)  
Antiguo 30/08/2008, 08:55
Avatar de masterojitos  
Fecha de Ingreso: julio-2008
Ubicación: Lima Callao Chucuito
Mensajes: 1.931
Antigüedad: 15 años, 9 meses
Puntos: 105
Respuesta: Ayuda urgente porfavor

Cita:
Iniciado por djdraft Ver Mensaje
si pero el problema es que en la pc, osea en el localhost se me ve perfectamente pero cuando lo subo a mi servidor me da ese error
Solo te puedo responer que tu session_start() debe estar al inicio, a menos que utilizes la funcion ob_start() al inicio de todo tu codigo y ob_flush() al final......

tu codigo debe quedar asi:

Código PHP:
<?php session_start(); ?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MINERAFM</title>
<link rel="icon" href="imagenes/animated_favicon1.gif" type="image/gif" >

<link rel="stylesheet" href="stylos/stylo_principal.css" type="text/css" />
<link rel="stylesheet" href="stylos/menu.css" type="text/css" />
<link rel="stylesheet" href="stylos/tags.css" type="text/css" />


</head>

<body>
<div class="wraper">
<div class="cabecera" style="text-align: center; background-color: #fff; padding:2px;">
<!-- ImageReady Slices (mineraproyect.psd) -->
<table id="Tabla_01" width="970" height="200" border="0" cellpadding="0" cellspacing="0" align=center>
<tr>
<td colspan="3">
<img src="imagenes/mineraproyect_01.jpg" width="970" height="51" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="imagenes/mineraproyect_02.jpg" width="533" height="149" alt=""></td>
<td>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="425" height="115">
<param name="movie" value="flash/banner.swf" />
<param name="quality" value="high"/>
<embed src="flash/banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="425" height="115"></embed>
</object></noscript>
</td>
<td rowspan="2">
<img src="imagenes/mineraproyect_04.jpg" width="12" height="149" alt=""></td>
</tr>
<tr>
<td>
<img src="imagenes/mineraproyect_05.jpg" width="425" height="34" alt=""></td>
</tr>
</table>
<!-- End ImageReady Slices -->



</div>

<div id="menu">
<ul id="navi">
<li><a href="index.php" title="VOLVER A LA PAGINA DE INICIO">INICIO</a></li>
<li><a href="index.php?id=noticias" title="Ultimas Noticias">NOTICIAS</a></li>
<li><a href="index.php?id=recientes" title="nacionales">RECIENTES</a></li>
<li><a href="index.php?id=contactos" title="nacionales">CONTACTANOS</a></li>
<li><a href="index.php?id=links" title="nacionales">LINKS</a></li>
</ul>
</div>


<?php
if(!empty($_SESSION['usuario'])){

echo 
"<div class=\"menu_admin\"><h3>Menu de administracion</h3>";
echo 
"<a title=\"agregar nuevo articulo\" href=\"index.php?id=add\">AGREGAR NUEVO ARTICULO </a> | ";

echo 
"<a title=\"Usa esta opcion para borrar comentarios no deseados\" href=\"index.php?id=edit_seciones\">EDITAR SECCIONES</a> | ";

echo 
"<a title=\"muestra una lista de todos los articulos que estan en la base de datos para borrarlos\" href=\"index.php?id=add\">LISTAR TODOS LOS ARTICULOS</a> | ";

echo 
"<a title=\"Usa esta opcion para borrar comentarios no deseados\" href=\"index.php?id=mod_coment\">MODERAR COMENTARIOS</a> | ";

echo 
"<a title=\"!!Importante siempre cerrar seccion\" href=\"modulos/logout.php\">CERRAR SECCION</a></div>";
}
?>
o asi:

Código PHP:
<?php ob_start(); ?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MINERAFM</title>
<link rel="icon" href="imagenes/animated_favicon1.gif" type="image/gif" >

<link rel="stylesheet" href="stylos/stylo_principal.css" type="text/css" />
<link rel="stylesheet" href="stylos/menu.css" type="text/css" />
<link rel="stylesheet" href="stylos/tags.css" type="text/css" />


</head>

<body>
<div class="wraper">
<div class="cabecera" style="text-align: center; background-color: #fff; padding:2px;">
<!-- ImageReady Slices (mineraproyect.psd) -->
<table id="Tabla_01" width="970" height="200" border="0" cellpadding="0" cellspacing="0" align=center>
<tr>
<td colspan="3">
<img src="imagenes/mineraproyect_01.jpg" width="970" height="51" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="imagenes/mineraproyect_02.jpg" width="533" height="149" alt=""></td>
<td>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="425" height="115">
<param name="movie" value="flash/banner.swf" />
<param name="quality" value="high"/>
<embed src="flash/banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="425" height="115"></embed>
</object></noscript>
</td>
<td rowspan="2">
<img src="imagenes/mineraproyect_04.jpg" width="12" height="149" alt=""></td>
</tr>
<tr>
<td>
<img src="imagenes/mineraproyect_05.jpg" width="425" height="34" alt=""></td>
</tr>
</table>
<!-- End ImageReady Slices -->



</div>

<div id="menu">
<ul id="navi">
<li><a href="index.php" title="VOLVER A LA PAGINA DE INICIO">INICIO</a></li>
<li><a href="index.php?id=noticias" title="Ultimas Noticias">NOTICIAS</a></li>
<li><a href="index.php?id=recientes" title="nacionales">RECIENTES</a></li>
<li><a href="index.php?id=contactos" title="nacionales">CONTACTANOS</a></li>
<li><a href="index.php?id=links" title="nacionales">LINKS</a></li>
</ul>
</div>


<?php

session_start
();
if(!empty(
$_SESSION['usuario'])){

echo 
"<div class=\"menu_admin\"><h3>Menu de administracion</h3>";
echo 
"<a title=\"agregar nuevo articulo\" href=\"index.php?id=add\">AGREGAR NUEVO ARTICULO </a> | ";

echo 
"<a title=\"Usa esta opcion para borrar comentarios no deseados\" href=\"index.php?id=edit_seciones\">EDITAR SECCIONES</a> | ";

echo 
"<a title=\"muestra una lista de todos los articulos que estan en la base de datos para borrarlos\" href=\"index.php?id=add\">LISTAR TODOS LOS ARTICULOS</a> | ";

echo 
"<a title=\"Usa esta opcion para borrar comentarios no deseados\" href=\"index.php?id=mod_coment\">MODERAR COMENTARIOS</a> | ";

echo 
"<a title=\"!!Importante siempre cerrar seccion\" href=\"modulos/logout.php\">CERRAR SECCION</a></div>";
}
ob_flush();
?>
ya tu mismo eres....
__________________
Atte. MasterOjitos :ojotes:
Todo sobre Programación Web
Las ultimas tendencias en Efectos y Recursos Web: MasterOjitos Blog
  #8 (permalink)  
Antiguo 30/08/2008, 11:47
Avatar de djdraft  
Fecha de Ingreso: abril-2008
Mensajes: 118
Antigüedad: 16 años
Puntos: 0
Respuesta: Ayuda urgente porfavor

gracias bro ya puede resolver el problema, pueden hechar un viztaso, Www.minerafm.com
__________________
<img src="http://i280.photobucket.com/albums/kk197/djdraft22/DR.jpg">
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 05:09.