problemas con session start
Publicado por Howard (3 intervenciones) el 25/04/2017 01:43:37
hola .. en mi computadora osea localhost todo funciona bien, pero ahora lo subí a un host y me tira estos errores
[24-Apr-2017 23:31:18 UTC] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:18 UTC] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:24 UTC] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:24 UTC] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:24 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 87
estas son las paginas
index
y la login
ayuda l oantes posible porfavor :(
[24-Apr-2017 23:31:18 UTC] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:18 UTC] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:24 UTC] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:24 UTC] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 39
[24-Apr-2017 23:31:24 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/tnwcounterstrike/public_html/login.php:37) in /home/tnwcounterstrike/public_html/login.php on line 87
estas son las paginas
index
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!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>
<?
session_start();
include_once "conection.php";
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The New World Cs - Figth For Honor beta 1.0</title>
<link href="css/ppstyles.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="images/Logo.ico" />
<link href="css/fontello.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Raleway:400,600" rel="stylesheet">
<!-- Start WOWSlider.com HEAD section -->
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<script type="text/javascript" src="engine1/jquery.js"></script>
<!-- End WOWSlider.com HEAD section -->
<!-- Start WOWSlider.com HEAD section --> <!-- add to the <head> of your page -->
<link rel="stylesheet" type="text/css" href="engine0/style.css" />
<!--script type="text/javascript" src="engine0/jquery.js"></script-->
<!-- End WOWSlider.com HEAD section --></head>
<body>
<div id="container">
<div id="header">
<nav>
<ul>
<li><a href="index.php">Inicio <span class="icon icon-up-dir"></span></a></li>
<li><a href="#">Foro <span class="icon icon-up-dir"></span></a></li>
<li><a href="perfil.php">Perfil <span class="icon icon-up-dir"></span></a></li>
<li><a href="compras.php">Compras <span class="icon icon-up-dir"></span></a></li>
</ul>
</nav>
</div>
<div id="slider">
<!-- Start WOWSlider.com BODY section --> <!-- add to the <body> of your page -->
<div id="wowslider-container0">
<div class="ws_images"><ul>
<li><img src="data0/images/de_dust0000.jpg" alt="de_dust0000" title="de_dust0000" id="wows0_0"/></li>
<li><img src="data0/images/de_dust0001.jpg" alt="de_dust0001" title="de_dust0001" id="wows0_1"/></li>
<li><img src="data0/images/de_dust0002.jpg" alt="de_dust0002" title="de_dust0002" id="wows0_2"/></li>
<li><img src="data0/images/de_dust0003.jpg" alt="de_dust0003" title="de_dust0003" id="wows0_3"/></li>
<li><img src="data0/images/de_dust0004.jpg" alt="de_dust0004" title="de_dust0004" id="wows0_4"/></li>
<li><img src="data0/images/de_dust0005.jpg" alt="de_dust0005" title="de_dust0005" id="wows0_5"/></li>
<li><a href="http://wowslider.com"><img src="data0/images/de_dust0006.jpg" alt="wowslideshow" title="de_dust0006" id="wows0_6"/></a></li>
<li><img src="data0/images/de_dust0007.jpg" alt="de_dust0007" title="de_dust0007" id="wows0_7"/></li>
</ul></div>
<div class="ws_script" style="position:absolute;left:-99%"><a href="http://wowslider.net">http://wowslider.net/</a> by WOWSlider.com v8.7</div>
<div class="ws_shadow"></div>
</div>
<script type="text/javascript" src="engine0/wowslider.js"></script>
<script type="text/javascript" src="engine0/script.js"></script>
<!-- End WOWSlider.com BODY section -->
</div>
<div id="startsec">
<?php
if(!isset($_SESSION['userid']))
{
echo '<img src="images/iconlogin.png">';
}
else
{
if($_SESSION['cl'] == 1)
{
echo '<img src="images/wolfestpp.png">';
}
if($_SESSION['cl'] == 2)
{
echo '<img src="images/warriorpp.png">';
}
if($_SESSION['cl'] == 3)
{
echo '<img src="images/archerpp.png">';
}
}
?>
<?php
if(!isset($_SESSION['userid']))
{
}
else
{
$nombre = $_SESSION['pj'];
echo "<font color='white'><center><h1>Bienvenido</font><font color='#8696F7'> $nombre</h1></center></font>";
}
?>
<div id="dialogsec">
<center><font color="white"><h2><nav id="enlaces"><?php
if(!isset($_SESSION['userid']))
{
echo"<a href='register.php'><img src=images/register3.jpg></a>";
echo"<a href='login.php'><img src=images/login1.png></a>";
}
else
{
echo"<a href=logout.php><img src=images/logout2.png></a>";
}
?>
</nav></br></h2> <font color="white">¡Registra o loguea una cuenta!<? echo $_SESSION['newsession']; ?></font>
</font></br><h4><font color="red">Fight For Honor beta 1.0</font></h4>
</div>
</div>
<div class="clear">
</div>
<div id="article">
<table width="100%" border="0">
<tr>
<td><img src="images/Logo.png" /></td>
<td><font color="white"><center><h1>The New World Cs - FFH</h1></center></br>Hola aquí encontrarás información sobre este mod y nuestro servidor. primero y principal ¿Que
es? FFH, FFH son las siglas de <font color="green"> Fight For Honor</font> es un modo de Counter Strike 1.6 derivado de los <font color="red">RPG</font>.</br><h1>
Puedes conseguir mas información de el mod en nuestro foro</h1></td>
</tr>
</table>
</br></br>
<font color ="white"> este mod trae diferentes clases que son necesarias para cada equipo, cada jugador podra elejir entre distintas clases como lo son:</br></br>1)<font color="red"> Archer
</font>:</br>Es un arquero, usa arma a distancia como arcos y ballestas, sus habilidades:
<font color="green">Disparo penetrante:</font> El arquero aumenta su daño para causar 2200 puntos de daño en su oponente.
<font color="green">Trampa congelante:</font>El arquero obtiene una trampa de hielo la cual al ser arrojada a sus enemigos los congelas y los deja sin atacar dándole la
ventaja a este.</br></br>2)<font color="red">Warrior</font>: Es un guerrero, usa arma cuerpo a cuerpo como espadas, hachas y mazas tiene dos habilidades:
<font color="green">Caparazón de hierro:</font> El guerrero endurece su cuerpo lo cual le otorga vida, armadura y daño hasta que este muera.
<font color="green">Espada Indignante:</font> El guerrero unta su espada con magia indignante lo cual aumenta su daño en 1500 puntos y también su velocidad de movimiento
</br></br>
cada clase tiene diferentes habilidades, el juego consiste en trabajar en equipo hasta obtener la victoria (derrotar al otro equipo),
el equipo que gane una batalla ganará como recompensa <font color="green">MD</font> o mejor dicho Medals honor's la cual sirven para mejorar tu jugador es decir,
comprar armas y armaduras.
</div>
<div id="advice">
<img src="images/DowCs.jpg" /></br></br>
<img src="images/buy.png" /></br></br>
<img src="images/foro1.jpg" /></br></br>
</div>
<div class="clear2">
</div>
<div id="footer">
<center><h4><font color="white">Tnw CS - FFH 1.0</br>Pagina creada por Since</br>copyright © 2017 - 2018</font></h4></center>
</div>
</div>
</body>
</html>
y la login
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!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=utf-8" />
<link href="css/loginstyles.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="images/Logo.ico" />
<title>TNW CS - Loguearse</title>
</head>
<body>
<div id="container">
<div id="header">
<nav>
<ul>
<li><a href="index.php">Inicio <span class="icon icon-up-dir"></span></a></li>
<li><a href="#">Foro <span class="icon icon-up-dir"></span></a></li>
<li><a href="perfil.php">Perfil <span class="icon icon-up-dir"></span></a></li>
<li><a href="compras.php">Compras <span class="icon icon-up-dir"></span></a></li>
</ul>
</nav>
</div>
<div id="article">
<div id="box">
<form action="" method="post" class="login">
<div><label>Username</label><input name="user" type="text" ></div>
<div><label>Password</label><input name="password" type="password"></div>
<div><input name="login" type="submit" value="login"></div>
</form></div></br></br></br></br></br>
</div>
<div class="clear">
</div>
<div id="footer">
<center><h4><font color="white">Tnw CS - FFH 1.0</br>Pagina creada por Since</br>copyright © 2017 - 2018</font></h4></center>
</div>
</div>
<?
session_start();
include_once "conection.php";
function verificar_login($user,$password,&$result) {
$loginUser = md5($_POST["user"]);
$loginPassword = md5($_POST["password"]);
$sql = "SELECT * FROM cuentas WHERE Usuario = '$loginUser' and Password = '$loginPassword'";
$rec = mysql_query($sql);
$count = 0;
while($row = mysql_fetch_object($rec))
{
$count++;
$result = $row;
}
if($count == 1)
{
return 1;
}
else
{
return 0;
}
}
if(!isset($_SESSION['userid']))
{
if(isset($_POST['login']))
{
if(verificar_login($_POST['user'],$_POST['password'],$result) == 1)
{
$_SESSION['userid'] = $result->id;
$_SESSION['pj'] = $result->Pj;
$_SESSION['hm'] = $result->honormedals;
$_SESSION['hs'] = $result->honorstatues;
$_SESSION['cl'] = $result->clase;
$_SESSION['wpid'] = $result->idweapon;
$_SESSION['hp'] = $result->vida;
$_SESSION['armor'] = $result->armadura;
$_SESSION['spd'] = $result->speed;
$_SESSION['grv'] = $result->gravity;
$_SESSION['dmg'] = $result->damage;
$_SESSION['ia'] = $result->armorid;
$_SESSION['uo'] = $result->useron;
header("location:index.php");
}
else
{
echo "<script language='JavaScript'>alert('Usuario o Contraseña incorrecta intente nuevamente');</script>";
}
}
}
?>
</body>
</html>
ayuda l oantes posible porfavor :(
Valora esta pregunta
0