• 12-01-2008, 01:12:25
    #1
    arkadaşlar selam

    - sitesindeki sorunu ve ne yapabileceğimi söyleyebilecek biri varmı
  • 12-01-2008, 01:24:25
    #2
    Üyeliği durduruldu
    Ayar.inc.php nin 16. satırı nedir ?
  • 12-01-2008, 01:27:23
    #3
    require_once("config.inc.php");
    db_baglanti();

    $sorgu = mysql_query("Select * from ayarlar where id='1'");
    $veri = mysql_fetch_array($sorgu); ---------------------> 16. Satır

    //Gerekli Bilgiler..
  • 12-01-2008, 01:36:10
    #4
    sanırım config.inc.php dosyasında bi problem var
  • 12-01-2008, 01:39:33
    #5
    PHP config
    <?php
    //DB baglanti
    function db_baglanti()
    {
      $db_host = "localhost";
      $db_kullanici = "****";   // Db kullanici adiniz
      $db_sifre = "*****";           // Db sifreniz
      $db_adi = "*****";       // Db adiniz
    		$baglanti = @mysql_connect($db_host,$db_kullanici,$db_sifre);
    		if(!$baglanti){ die("Database Bağlantısı Sağlanamadı: " . mysql_errno()); }
    		$select = @mysql_select_db($db_adi,$baglanti);
    		if(!$select){ die("Database Seçilemedi: " . mysql_errno()); }
    		@mysql_query("SET NAMES 'latin5'");
    		@mysql_query("SET CHARACTER SET latin5");
    		@mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'"); 
       		@mysql_free_result($baglanti);
    }
    if(file_exists("../install.php")):
    $log = explode('/',$_SERVER['PHP_SELF']);
    if($log[2] != "install.php"):
    	header("Location: install.php");
    	exit;
    	endif;
    endif;
    ?>
  • 12-01-2008, 01:45:26
    #6
    ayar.inc.php


    <?php
      /* $db_host = "localhost";
      $db_kullanici = "*********";  
      $db_sifre = "*******";           
      $db_adi = "*******";      
    
      @$baglanti = mysql_connect($db_host,$db_kullanici,$db_sifre) or die ("Veri Taban&yacute;na Ba&eth;lan&yacute;lam&yacute;yor..");
      @ mysql_select_db($db_adi,$baglanti) or die("Veritaban&yacute; Bulunamad&yacute;..");
    	mysql_query("SET NAMES 'latin5'");
    	mysql_query("SET CHARACTER SET latin5");
       mysql_free_result($baglanti); */
       require_once("config.inc.php");
       db_baglanti();
     
    $sorgu = mysql_query("Select * from ayarlar where id='1'");
    $veri = mysql_fetch_array($veri);
    
    //Gerekli Bilgiler..
    $siteadi = $veri['siteadi'];
    $siteadresi = $veri['site'];
    $slogan =  $veri['Makale, Makaleler, Bilgi Bankasi']; // Site Slogani..
    $site_mail =  $veri['mail']; //Admin Mail
    $adsense =  $veri['adsense']; //adsense pub_no
    $sinir =  $veri['sinir'];
    $boyut =  $veri['sifre'];
    $uzun =  $veri['guvenlik'];
    $uyelik =  $veri['uyelik'];
    $cookie = $veri['Cookie'];
    
    //sayfalama limiti..
    function LIMIT()
    {
    global $sinir;
    $limit = $sinir;
    return $limit;
    }
    
    //Yeni &thorn;ifre taleplerinde kullan&yacute;l&yacute;r
    function SifreUret() {
    global $boyut;
    $plength = $boyut;
       if(!is_numeric($plength) || $plength <= 0) {
          $plength = 8;
       }
       if($plength > 32) {
          $plength = 32;
       }
       $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
       mt_srand(microtime() * 1000000);
       for($i = 0; $i < $plength; $i++) {
          $key = mt_rand(0,strlen($chars)-1);
          $pwd = $pwd . $chars{$key};
       }
       for($i = 0; $i < $plength; $i++) {
         $key1 = mt_rand(0,strlen($pwd)-1);
         $key2 = mt_rand(0,strlen($pwd)-1);
                
         $tmp = $pwd{$key1};
         $pwd{$key1} = $pwd{$key2};
         $pwd{$key2} = $tmp;
       }
       return $pwd;
       } 
       
    //Güvenlik resmi üretmek için..
    function ResimUret() {
    global $uzun;
    $uzunluk = $uzun;
      session_start();
      header ("Content-type: image/png");
      srand((double)microtime() * 1000000);
    
      # Guvenlik kodu
      $kod   = substr(md5(uniqid(rand())),0,$uzunluk);
      $_SESSION["kod"] = $kod; // Kodu oturuma kaydet
    
      # Fontlar ..
      $font  = array(
           "arial.ttf",
         "tahoma.ttf",
         "verdana.ttf", 
         "enya.ttf",
         "inkburro.ttf",
         "marydale.ttf",
         );
    
      # Resmi haz&yacute;rla
      $resim = @imagecreate((strlen($kod)*20)+20,50);
      $zemin = imagecreatefrompng('zemin.png');
      $metin = imagecolorallocate ($resim, 0, 0, 0);
    
      imagesettile($resim,$zemin);
      imagefilledrectangle($resim,0,0,(strlen($kod)*20)+20,50,IMG_COLOR_TILED);
    
      # Kodu bas ..
      for($i=0; $i < strlen($kod); $i++){
         shuffle($font);
         imagettftext($resim, 20, 0, 10+($i*20),35, $metin, "Font/".current($font),$kod[$i]);
         }
    
      # Resmi Ç&yacute;kart
      imagepng($resim);
      imagedestroy($resim);
       }
       
    //db_Baglanti_kapat();
    ?>
  • 12-01-2008, 02:50:32
    #7
    Cevap verecek kimse yok mu
  • 12-01-2008, 08:10:53
    #8
    Kimlik doğrulama veya yönetimden onay bekliyor.
    böyle durumlarda sayfanın en altına

    echo "<h1>".mysql_error()."</h1>";

    yazarak Hataları Daha iyi Görebilirsiniz hatayı gördükten ve düzeltikten sonra silersiniz satırı
  • 12-01-2008, 13:11:47
    #9
    $sorgu = mysql_query("Select * from ayarlar where id='1'");
    $veri = mysql_fetch_array($veri);

    yarine

    $sorgu = mysql_query("Select * from ayarlar where id='1'");
    $veri = mysql_fetch_array($sorgu);

    yapmalısın