• 09-03-2010, 00:00:17
    #1
    arkadaşlar düzelt.php dosyamda bi hata alıyorum çözemedim Çözebilen varsa sevinirim.

    hata şu : Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/yuksel/public_html/cms/yonet/duzelt.php:3) in /home/yuksel/public_html/cms/yonet/duzelt.php on line 5

    kodlarım aşağıda
    __________________________________________________ ____
    <?php require_once('../mysql/db.php'); ?>
    
    <?php
    
    session_start();
    
    $MM_authorizedUsers = "";
    
    $MM_donotCheckaccess = "true";
    
    
    
    // *** Restrict Access To Page: Grant or deny access to this page
    
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
    
      // For security, start by assuming the visitor is NOT authorized. 
    
      $isValid = False; 
    
    
    
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
    
      // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
    
      if (!empty($UserName)) { 
    
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    
        // Parse the strings into arrays. 
    
        $arrUsers = Explode(",", $strUsers); 
    
        $arrGroups = Explode(",", $strGroups); 
    
        if (in_array($UserName, $arrUsers)) { 
    
          $isValid = true; 
    
        } 
    
        // Or, you may restrict access to only certain users based on their username. 
    
        if (in_array($UserGroup, $arrGroups)) { 
    
          $isValid = true; 
    
        } 
    
        if (($strUsers == "") && true) { 
    
          $isValid = true; 
    
        } 
    
      } 
    
      return $isValid; 
    
    }
    
    
    
    $MM_restrictGoTo = "ok.php?mesaj=giris";
    
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
    
      $MM_qsChar = "?";
    
      $MM_referrer = $_SERVER['PHP_SELF'];
    
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
    
      if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
    
      $MM_referrer .= "?" . $QUERY_STRING;
    
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
    
      header("Location: ". $MM_restrictGoTo); 
    
      exit;
    
    }
    
    ?>
    
    <?php
    
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    
    {
    
      $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
    
    
    
      switch ($theType) {
    
        case "text":
    
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    
          break;    
    
        case "long":
    
        case "int":
    
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    
          break;
    
        case "double":
    
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
    
          break;
    
        case "date":
    
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    
          break;
    
        case "defined":
    
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    
          break;
    
      }
    
      return $theValue;
    
    }
    
    
    
    $editFormAction = $_SERVER['PHP_SELF'];
    
    if (isset($_SERVER['QUERY_STRING'])) {
    
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    
    }
    
    
    
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form2")) {
    
      $updateSQL = sprintf("UPDATE sayfalar SET sira=%s, sayfa=%s, menu=%s, baslik=%s, icerik=%s WHERE id=%s",
    
                           GetSQLValueString($_POST['sira'], "int"),
    
                           GetSQLValueString($_POST['sayfa'], "text"),
    
                           GetSQLValueString($_POST['menu'], "text"),
    
                           GetSQLValueString($_POST['baslik'], "text"),
    
                           GetSQLValueString($_POST['icerik'], "text"),
    
                           GetSQLValueString($_POST['id'], "int"));
    
    
    
      mysql_select_db($database_db, $db);
    
      $Result1 = mysql_query($updateSQL, $db) or die(mysql_error());
    
    
    
      $updateGoTo = "ok.php?mesaj=duzelt";
    
      if (isset($_SERVER['QUERY_STRING'])) {
    
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    
        $updateGoTo .= $_SERVER['QUERY_STRING'];
    
      }
    
      header(sprintf("Location: %s", $updateGoTo));
    
    }
    
    
    
    $colname_Recordset1 = "1";
    
    if (isset($_GET['id'])) {
    
      $colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
    
    }
    
    mysql_select_db($database_db, $db);
    
    $query_Recordset1 = sprintf("SELECT * FROM sayfalar WHERE id = %s", $colname_Recordset1);
    
    $Recordset1 = mysql_query($query_Recordset1, $db) or die(mysql_error());
    
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
    
    <link href="admin.css" rel="stylesheet" type="text/css">
    
    <!-- TinyMCE -->
    
    <script language="javascript" type="text/javascript">
    
    	tinyMCE.init({
    
    		mode : "textareas",
    
    		theme : "advanced",
    
    		plugins : "table,advhr,advimage,advlink,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen",
    
    		theme_advanced_buttons1_add_before : "newdocument,separator",
    
    		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
    
    		theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
    
    		theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
    
    		theme_advanced_buttons3_add_before : "tablecontrols,separator",
    
    		theme_advanced_buttons3_add : "iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
    
    		theme_advanced_toolbar_location : "top",
    
    		theme_advanced_toolbar_align : "left",
    
    		theme_advanced_statusbar_location : "bottom",
    
    	  	content_css : "../stil.css",
    
    	 	plugi2n_insertdate_dateFormat : "%d-%m-%Y",
    
    		plugi2n_insertdate_timeFormat : "%H:%M:%S",
    
    		paste_use_dialog : false,
    
    		theme_advanced_resizing : true,
    
    		theme_advanced_resize_horizontal : false,
    
    		paste_auto_cleanup_on_paste : true,
    
    		paste_convert_headers_to_strong : false,
    
    		paste_strip_class_attributes : "all",
    
    		paste_remove_spans : false,
    
    		paste_remove_styles : false		
    
    	});
    
    
    
    	function fileBrowserCallBack(field_name, url, type, win) {
    
    		// This is where you insert your custom filebrowser logic
    
    		alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);
    
    
    
    		// Insert new URL, this would normaly be done in a popup
    
    		win.document.forms[0].elements[field_name].value = "herhangi.htm";
    
    	}
    
    </script>
    
    <!-- /TinyMCE -->
    
    </head>
    
    
    
    <body>
    
    <fieldset><legend>Buradan oluşturduğunuz sayfayı düzenleyebilirsiniz</legend>
    
    <form method="post" name="form2" action="<?php echo $editFormAction; ?>">
    
    <table width="100%"  border="0" cellpadding="5">
    
      <tr>
    
        <td>Sayfa Sıra No : </td>
    
        <td><input type="text" name="sira" value="<?php echo $row_Recordset1['sira']; ?>" size="32"></td>
    
        <td>Sayfa URL Adı : </td>
    
        <td><input type="text" name="sayfa" value="<?php echo $row_Recordset1['sayfa']; ?>" size="32"></td>
    
      </tr>
    
      <tr>
    
        <td>Sayfanın Menüdeki Adı : </td>
    
        <td><input type="text" name="menu" value="<?php echo $row_Recordset1['menu']; ?>" size="32"></td>
    
        <td>Sayfa İçerik Başlığı : </td>
    
        <td><input type="text" name="baslik" value="<?php echo $row_Recordset1['baslik']; ?>" size="32"></td>
    
      </tr>
    
      <tr>
    
        <td colspan="4" valign="top">Sayfa İçeriği : <br><br>
    
                  <?
    
    $aq = $row_Recordset1['icerik'];
    
    
     
    
    
    
                  include("wysiwyg/fckeditor.php");
    
    
    
                  $oFCKeditor = new FCKeditor('icerik');
    
    
    
                  $oFCKeditor->BasePath="wysiwyg/";
    
    
    
                  $oFCKeditor->Width="700";
    
    
    
                  $oFCKeditor->Height="400";
    
    
    
                 $oFCKeditor->Value="$aq";
    
                  //$oFCKeditor->ToolbarSet="Basic";
    
    
    
                  $oFCKeditor->Create();
    
    
    
     
    
    
    
                  ?></td>
    
        </tr>
    
      <tr>
    
        <td colspan="4" valign="top"><input type="submit" value="Sayfayı düzelt"></td>
    
      </tr>
    
    </table>
    
      <input type="hidden" name="MM_update" value="form2">
    
      <input type="hidden" name="id" value="<?php echo $row_Recordset1['id']; ?>">
    
    </form>
    
    </fieldset>
    
    </body>
    
    </html>
    
    <?php
    
    mysql_free_result($Recordset1);
    
    ?>
  • 09-03-2010, 00:02:27
    #2
    <?php require_once('../mysql/db.php'); ?>

    <?php

    session_start();

    bu kısımı asagıdaki gibi degiştir.



    <?php
    ob_start();
    session_start();
    require_once('../mysql/db.php');
  • 09-03-2010, 00:04:53
    #3
    Üstadım konuyu açalı 1 dk olmadan problem çözüldü :| Çok teşekkür ederim.
  • 09-03-2010, 00:07:11
    #4
    Verdıklerımı calıstırdıysa mesele yok Rica ederim.
  • 09-03-2010, 15:08:10
    #5
    bişey söylemek isterim ob_start(); fonksiyonuna gerek yok
  • 09-03-2010, 15:50:32
    #6
    Üyeliği durduruldu
    işinizin görülmesine sevindim . ama şu kodlarını [ PHP ] tagları arasına yazabilir misiniz.
  • 16-03-2010, 00:17:41
    #7
    Problem ilk dakikada çözülmüştü zaten sağolun...