Foros del Web » Programando para Internet » PHP »

es por la version?

Estas en el tema de es por la version? en el foro de PHP en Foros del Web. hola, tengo una web programada en php y la tengo instalada en un servidor con php 5.2.5 y los usuarios se puede loguera perfectamente pero ...
  #1 (permalink)  
Antiguo 28/07/2008, 13:35
 
Fecha de Ingreso: julio-2008
Mensajes: 2
Antigüedad: 15 años, 9 meses
Puntos: 0
es por la version?

hola, tengo una web programada en php y la tengo instalada en un servidor con php 5.2.5 y los usuarios se puede loguera perfectamente pero la paso a un servidor con php 5.2.6 y me al intentar loguearse me lanza este error:


Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\estrenos\login.php:148) in D:\AppServ\www\estrenos\login.php on line 178

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\estrenos\login.php:148) in D:\AppServ\www\estrenos\login.php on line 180

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\estrenos\login.php:148) in D:\AppServ\www\estrenos\login.php on line 182

Debajo os dejo el codigo del login.php


<?

if($_GET[iniciar] == "sesion") {

?>

<table width="360" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="3%"><img src="imagenes/web/tabla/tabla1.gif" width="31" height="41" /></td>

<td width="92%" background="imagenes/web/tabla/tabla2.gif"><font color="#666666"><strong>Iniciar sesi&oacute;n</strong></font></td>

<td width="5%"><img src="imagenes/web/tabla/tabla3.gif" width="22" height="41" /></td>

</tr>

</table>

<table width="359" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="2%" background="imagenes/web/tabla/tabla5.gif"><img src="imagenes/web/tabla/tabla5.gif" width="12" height="29" /></td>

<td width="97%" bgcolor="#E3E3E3"><div align="center">

<table width="335" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="294"><div align="center">

<table width="324" border="0" align="center" cellpadding="4" cellspacing="2">

<tr>

<td width="312"><font face="Tahoma" style="font-size: 8pt" color="#FFFFFF"> <strong><font color="#EEEEEE">

<form action="login.php" method="post" name="form1" id="form1">

<table width="100%" border="0" cellspacing="3" cellpadding="3">

<tr>

<td colspan="2"><div align="center"><font color="#666666">Para iniciar sesi&oacute;n

primero deber&aacute;s tener una cuenta, si no la tienes

cr&eacute;atela haciendo click aqu&iacute; totalmente gratis.

Si y&aacute; tienes una introduce tus datos</font></div></td>

</tr>

<tr>

<td width="49%"><font color="#CCCCCC"><strong><font color="#FFCC00" face="Tahoma">+</font> <font color="#666666">Usuario: </font></strong></font></td>

<td width="51%"><strong>

<input name="user" type="text" id="user" size="20" class="formu" />

</strong></td>

</tr>

<tr>

<td><font color="#CCCCCC"><strong><font color="#FFCC00" face="Tahoma">+</font> <font color="#666666">Contrase&ntilde;a: </font></strong></font></td>

<td><strong>

<input name="pass" type="text" id="pass" size="20" class="formu" />

</strong></td>

</tr>

<tr>

<td colspan="2"><div align="center">

<input name="login" type="submit" id="login3" value="Iniciar sesi&oacute;n" class="formu" />

</div></td>

</tr>

</table>

</p>

</form>

</font></strong></font></td>

</tr>

<tr> </tr>

</table>

</div> </td>

</tr>

</table>

</div></td>

<td width="1%" background="imagenes/web/tabla/tabla4.gif"><img src="imagenes/web/tabla/tabla4.gif" width="14" height="29" /></td>

</tr>

</table>

<table width="361" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="3%"><img src="imagenes/web/tabla/tabla7.gif" width="12" height="17" /></td>

<td width="96%" background="imagenes/web/tabla/tabla8.gif">&nbsp;</td>

<td width="1%"><img src="imagenes/web/tabla/tabla6.gif" width="14" height="17" /></td>

</tr>

</table></td>

</tr>

</table>

<?

//

}else {

?>

<?

if($_POST[login]) {

if($_POST[user] && $_POST[pass]) {

include("config.php");

$contrasena = md5($_POST[pass]);

$comprobaridentidad = mysql_query("select * from usuarios where nick='$_POST[user]'");

if(mysql_num_rows($comprobaridentidad) == 0) {

header("location: iniciarsesion.html");

}

else {

$datosu = mysql_fetch_array($comprobaridentidad);

if($datosu[contrasena] != $contrasena) {

header("location: iniciarsesion.html");

}

else {

setcookie("usuario_nick",$_POST[user],time()+7776000) ;

setcookie("usuario_pass",$contrasena,time()+777600 0) ;

header("location: index.php");

}

}

}

else {

header("location: iniciarsesion.html");

}

//

}

else {

?>

<?

}

}

?>



GRacias de antemano
  #2 (permalink)  
Antiguo 28/07/2008, 13:44
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Respuesta: es por la version? AYUDA

Tema trasladado a PHP General.
  #3 (permalink)  
Antiguo 28/07/2008, 18:17
AlvaroG
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: es por la version?

Fijate por acá: http://www.forosdelweb.com/f18/faqs-...ml#post2037876


Saludos.
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 17:03.