• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

It helps with my web of gunz

Newbie Spellweaver
Joined
Mar 31, 2010
Messages
17
Reaction score
0
Hello friends of ragezone

It wanted that they were helping me in a mistake that goes out in my web of gunz, when they give login

Carliito - It helps with my web of gunz - RaGEZONE Forums


Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\index.php:1) in C:\AppServ\www\gunz\mod_login.php on line 26

In the line 26 one finds this

Carliito - It helps with my web of gunz - RaGEZONE Forums


PHP:
header("Location: $url");

Help please :thumbup:

my msn is : CarlitoBOT@live.com :D
 
Newbie Spellweaver
Joined
Mar 9, 2010
Messages
78
Reaction score
16
Sorry a quick reply

Add this code at the beginning of your site
Code:
ob_start();
if(!extension_loaded('zlib')){
@ini_set('zlib.output_compression_level',1);
@ob_start('ob_gzhandler'); 
}

add this at the bottom of your code
Code:
ob_end_flush();

Ps: Xampp is very better, but if you do use it REMEMBER to set your php.ini to allow mssql dll

The problem is that some editors seem to add additional blanks (spaces) and/or empty lines at the end of a file when you edit it. This so-called whitespace is then sent to the browser when the file is loaded and interferes with the header of a page that the server tries to send to the browser, often causing problems such as login problems

The fix is, obviously, to remove that whitespace from the file. Read the error message carefully. It says "output started at ..." followed by a file name and a line number. That is the file (and line) that you need to edit. Ignore the second file name - that is only a file that included the file that has the whitespace
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Mar 31, 2010
Messages
17
Reaction score
0
Sorry a quick reply

Add this code at the beginning of your site
Code:
ob_start();
if(!extension_loaded('zlib')){
@ini_set('zlib.output_compression_level',1);
@ob_start('ob_gzhandler'); 
}

add this at the bottom of your code
Code:
ob_end_flush();

Ps: Xampp is very better, but if you do use it REMEMBER to set your php.ini to allow mssql dll

The problem is that some editors seem to add additional blanks (spaces) and/or empty lines at the end of a file when you edit it. This so-called whitespace is then sent to the browser when the file is loaded and interferes with the header of a page that the server tries to send to the browser, often causing problems such as login problems

The fix is, obviously, to remove that whitespace from the file. Read the error message carefully. It says "output started at ..." followed by a file name and a line number. That is the file (and line) that you need to edit. Ignore the second file name - that is only a file that included the file that has the whitespace

In the beginning of the page, that is to say in the index

But if the mistake this one in mod_login deberia of putting it is do not you believe?
 
Upvote 0
Newbie Spellweaver
Joined
Mar 31, 2010
Messages
17
Reaction score
0
Now when I give him login, says user logueado and despues sends the index and the userpanel does not go out

---------- Post added at 08:38 PM ---------- Previous post was at 08:33 PM ----------

my userpanel.php
PHP:
<?
if($_SESSION[AID] == "")
{
?>

<form name="login" method="POST" action="index.php?gunz=login"><table width="175" height="140" border="0" align="center" background="http://forum.ragezone.com/images/bn_pypanel.png" style="background-repeat:no-repeat; background-position:center">
  <tr>
    <td><div align="center">
      <table width="156" border="0" cellpadding="0" style="border-collapse: collapse; color: #FFF;">
											<tr>
												<td width="154" colspan="2" height="25"></td>
											</tr>
											<tr>
												<td width="154"><p>
												    <input name="userid" type="text" class="Login" style="float: left; background-image:url(images/login_username.png); background-repeat:no-repeat" tabindex="1" value="" size="12" maxlength="12">
												    </p></td>
												<td width="154" rowspan="2" valign="top" align="center">
												<input name="login" type="image" id="login" onmouseover="FP_swapImg(1,1,/*id*/'login',/*url*/'images/bn_login_on.png')" onmouseout="FP_swapImgRestore()" src="http://forum.ragezone.com/images/bn_login.png" align="right" width="50" height="50" border="0">
												</td>
											</tr>
											<tr>
												<td width="154" height="30">
											      <input name="pass"  type="password" class="Login" style="float: left; background-image:url(images/login_password.png); background-repeat:no-repeat" tabindex="2" size="12" maxlength="12">
											  </td>
											</tr>
											<tr>
												<td width="154" colspan="2">
												</td>
											</tr>
											<tr>
												<td width="154" colspan="2" height="15" valign="middle">
												<div align="center">
									  <table border="0" style="border-collapse: collapse" width="100%">
														<tr>
															<td width="2" height="20"></td>
															<td width="10">
															<img border="0" src="http://forum.ragezone.com/images/arrow.gif" width="10" height="10" id="img1783"></td>
															<td width="134" align="left" style="text-align: center"><div align="center" class="Estilo2"><a style="color:#999999; font-size: 12px; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;" href="index.php?gunz=rstpass">Olvidastes Tu Contraseña?</a></div>
														    <div align="center"></div></td>
														</tr>
														<tr>
															<td width="2" height="20"></td>
															<td width="10">
															<img border="0" src="http://forum.ragezone.com/images/arrow.gif" width="10" height="10"></td>
															<td width="134" align="left" style="text-align: center"><span class="Estilo2"><a style="color:#999999; text-align: center; font-size: 14px; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;" href="index.php?gunz=register">Registrarse</a></span></td>
														</tr>
													</table>
												</div>
												</td>
											</tr>
</table>
																</div></td>
  </tr>
</table>
<input type="hidden" name="submit" value="1">
</form>
<?
}else{
$res9 = mssql_query("SELECT * FROM Login WHERE AID = '".$_SESSION['AID']."'");
$a=mssql_fetch_assoc($res9);

$res = mssql_query("SELECT * FROM Character WHERE AID = '".$_SESSION['AID']."'");
$d=mssql_fetch_assoc($res);
$items = mssql_num_rows($res9);

$res2 = mssql_query("SELECT * FROM ClanMember WHERE CID = '".$d['CID']."'");
$query2 = mssql_query_logged("SELECT ACoins, ECoins FROM Account WHERE AID = '{$_SESSION[AID]}'");
$_PLAYER[Account]   = mssql_fetch_assoc($query2);
?>
							<table width="175" height="285" border="0" align="center" cellpadding="0" cellspacing="0" background="img/bn_pypanel_on2.png" style="background-repeat:no-repeat; background-position:topcenter">
                              <tr>
                                <td valign="top"><table width="155" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="212" height="30" class="Estilo4" align="center"><span class="Estilo4">Bienvenido,</span>
<?=$_SESSION[UserID]?>!
                                   </td>
                                  </tr>
                                  <tr>
                                    <td height="20"><font color="#FF0000" class="Estilo2"><strong>Nombre:</strong></font> <?=$_SESSION[Name]?></td>
                                  </tr>
                                  <tr>
                                    <td><font color="#FF0000" class="Estilo2"><strong>Email:</strong></font> <?=$_SESSION[Email]?></td>
                                  </tr>
                                  <tr>
                                    <td><font color="#FF0000" class="Estilo2"><strong>Tipo de Cuenta: 
                                    <?=$user?></strong></font></td>
                                  </tr>
                                  </table>
                                  <table width="1" border="0" align="center" cellpadding="0" cellspacing="0">
                                   
                                    <tr>
                                      <td height="60" valign="top"><table width="160" border="0" align="center" cellpadding="0">
                                        <tr>
                                          <td width="75"><font color="#00FFFF"><span class="select"><strong>E</strong></span><span class="Estilo2"><strong>Coins</strong>:</span></font></td>
                                          <td width="75"><?=$_PLAYER[Account][ECoins]?> </td>
                                        </tr>
                                        <tr>
                                          <td><font color="#00FFFF"><span class="select"><strong>A</strong></span></font><font color="#00FFFF" class="Estilo2"><strong>Coins:</strong></font></td>
                                          <td><?=$_PLAYER[Account][ACoins]?> </td>
                                        </tr>
                                        <tr>
                                          <td> </td>
                                          <td> </td>
                                        </tr>
                                        <tr>
                                          <td colspan="2"> </td>
                                        
                                        </tr>
                                         
                                      </table></td>
                                    </tr>
                                </table></td>
                              </tr>
</table>
<script language="javascript">
function UpdateClan()
{
	var Emblem = document.getElementById("clanblem");
	var ClanList = document.getElementById("clanlist");
	var MasterTxt = document.getElementById("clanmaster");
	var ClanLink = document.getElementById("editlink");

	var ClanData = ClanList.value;
	var CData = ClanData.split("-|-");

	MasterTxt.innerHTML = CData[1];
	Emblem.src = "clan/emblem/" + CData[3];
	ClanLink.href = "javascript:ShowPanel(" + CData[2] + ");";
}
</script>
<script language="javascript">
									UpdateClan();
								</script>
<?
}
?>


---------- Post added at 08:40 PM ---------- Previous post was at 08:38 PM ----------

my mod_login.php
PHP:
<?
if($_SESSION[AID] != "")
{
    header("Location: index.php");
    die();
}

if(isset($_POST[submit]))
{
    $user = clean($_POST[userid]);
    $pass = clean($_POST[pass]);
}
    $loginquery = mssql_query_logged("SELECT l.UserID, l.AID, c.UGradeID, l.Password, c.Name, c.Age, c.Email, c.RegDate FROM Login(nolock) l INNER JOIN Account(nolock) c ON l.AID = c.AID WHERE l.UserID = '$user' AND l.Password = '$pass'");
    if(mssql_num_rows($loginquery) == 1)
    {
        $logindata = mssql_fetch_row($loginquery);

        $_SESSION[UserID] = $logindata[0];
        $_SESSION[AID] = $logindata[1];
        $_SESSION[UGradeID] = $logindata[2];
        $_SESSION[Password] = $logindata[3];
        $_SESSION[Name] = $logindata[4];
        $_SESSION[Age] = $logindata[5];
	    $_SESSION[Email] = $logindata[6];
	    $_SESSION[RegDate] = $logindata[7];
	    $_SESSION[Usuario] = $logindata[0];
		
               alertbox("Usuario: ".$_SESSION[UserID]." Logueado","index.php");
    }else{
        
alertbox("Incorrect Username or Password.","index.php");
    die();
	}
?>
 
Upvote 0
Back
Top