Merhaba,

Elimde kodları aşağıdaki gibi olan bir script var. Bu script gayet güzelken şimdi sorun çıkarıyor. Pek fazla bilmediğim için tam olarak sorunu da anlamadım. Sanırım session da bir sorun var.

Localde php versiyonu 4.3.10 sorunsuz çalıştı.
Kendi websitemde 4.4.8 sorunsuz çalıştı.
Fakat doruknete yüklediğimde session hatası veriyor giriş yapamıyorum. Seçenek olarak 4.4.7 ve 5.2.5 sunulmuş 2sinde de denedim fakat olmadı.

Dosyalarımın kodları aşağıdaki gibi.

index.php
<?

	# Load Site Configs
	include ("includes/inc_site_config.php");
	# Load Sessions
	session_start();
	ob_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?=$SITETITLE?></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<link href="css/site.css" rel="stylesheet" type="text/css">
<? include ("inc_js.php"); ?>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="xinha_init();" >
<table width="775" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
  <tr align="center"> 
    <td width="800" height="20" valign="top" bgcolor=#ffffff> <? include ("inc_top_menu.php"); ?> </td>
  </tr>
  <tr align="center" > 
    <td valign="middle" bgcolor=#ffffff> <? include ("middle_inc.php"); ?> </td>
  </tr>
  <tr> 
    <td height="20" align="center" valign="top" bgcolor=#ffffff> <? include ("inc_buttom_menu.php"); ?> </td>
  </tr>
</table>
</body>
</html>
<?
	mysql_close();
	ob_end_flush();
?>

middle_inc.php
<?
	// Ask password?
	If (!session_is_registered("id")) {
		include("askpassword.php");
	}

	// Check password?
	If (isset($_POST['login'])) {
		include("checkpassword.php");
	}

	// Logoff?
	If (isset($_GET['logoff'])) {
		session_destroy();
		header("Location: index.php");
		exit();
	}

	// Main Page
	If (session_is_registered("id")) {
		include("main.php");
	}

?>
askpassword.php
<table width="94%" border="0" cellpadding="0" cellspacing="0">
  <FORM METHOD=POST ACTION="index.php">
  
  <tr>
    <td align="center" valign="middle"><table  border="0" cellpadding="0" cellspacing="0" class="editbox">
        <tr bgcolor="#FFFFFF"> 
          <td width="153" rowspan="6" align="left" valign="top"><img src="images/img136.jpg"></td>
          <td class="text">&nbsp;</td>
          <td colspan="2" align="center" class="style2 style3"><div align="left"> .: Yönetim Paneli</div></td>
        </tr>       
		 <tr> 
          <td bgcolor="#FFFFFF" class="text">&nbsp;</td>
          <td bgcolor="#FFFFFF" class="text"></td>
          <td width="97" bgcolor="#FFFFFF" class="text"></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF" >&nbsp;</td>
          <td bgcolor="#FFFFFF" >Kullan&yacute;c&yacute; Ad&yacute;</td>
          <td width="97" bgcolor="#FFFFFF" class="text"><input name="kullanici_adi" type="text" size="15" class="cancel"></td>
        </tr>
        <tr> 
          <td width="4" align="left" bgcolor="#FFFFFF" class="text">&nbsp;</td>
          <td width="61" align="left" bgcolor="#FFFFFF" >&THORN;ifrer</td>
          <td width="97" bgcolor="#FFFFFF" class="text"><input name="parolasi" type="password" size="15" class="cancel"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td colspan="2">&nbsp;</td>
          <td class="text"><input name="login" type="submit" class="tus" value="Giri&thorn;"> 
            <input name="reset" type="reset" value="Sil" class="tus"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="42" class="text">&nbsp; </td>
          <td colspan="2" class="text">IP adresiniz kay&yacute;tlara al&yacute;nm&yacute;&thorn;t&yacute;r:<br>          
            <?=$_SERVER["REMOTE_ADDR"]?>)</td>
        </tr>
      </table></td>
  </tr>
  </FORM>
</table>
checkpassword.php
<?


		$kullanici_adi = removeUwChar($_POST['kullanici_adi']);
		$parolasi = removeUwChar($_POST['parolasi']);
		$sql = "select * from tbl_admin where active = 1 and username ='$kullanici_adi' and password='$parolasi'";
		$result = MYSQL_QUERY($sql) or die(mysql_error());
		while ($row=mysql_fetch_array($result))
		{
			$id=$row["id"];
			$adi = $row["name"];
			$soyadi = $row["lastname"];
		}
		If (mysql_num_rows($result) < 1):
				Session_Destroy();
				Header("Location: index.php?errmsg=1");
		Else:
				session_register("username");
				session_register("id");
				Header("Location: index.php".SID);
		EndIf;
?>
yardımcı olabilirseniz sevinirim.