Web sayfamız sadece phpBB 3.0.x sürümlerine destek vermektedir. Konu açmadan, ileti yazmadan önce lütfen site kuralları sayfamıza göz atınız.

Bazı Konularda Çıkan Farklı Hata Mesajları

Forum kuralları
Lütfen bu bölüm ve alt bölümlerde yardım isterken "yardım isteme şablonu" nu kullanınız.

Bazı Konularda Çıkan Farklı Hata Mesajları

İleti basoglanh 21 Arl 2010 15:31

phpBB3 sürümü: 3.0.5
Panonun tam adresi: Bakınız
Eklentiler / Temalar: Prosilver
Eklentilerin indirme adresi: phpbbturkiye.net
İşletim sistemi, php ve mysql sürümünüz: MySQL 5.0.90
Sorun çıkan sayfa URL adresi:

Konuları Görebilmek İçin Demo Kullanıcı Hesabı;
Kullanıcı Adı: demo
Parola: demo123

Soru/hata tanımlamaları:
Hata Mesajları sırası ile şu şekildedir;
Konu 1'de Çıkan Hata Mesajı;
Kod: Tümünü seç
[phpBB Debug] PHP Notice: in file /thanks.php on line 147: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 148: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 149: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 150: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 147: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 148: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 149: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 150: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4000: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4002: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4003: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4004: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)


Konu 2'de Çıkan Hata Mesajı;
Kod: Tümünü seç
[phpBB Debug] PHP Notice: in file /thanks.php on line 147: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 148: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 149: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 150: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4000: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4002: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4003: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4004: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)


Konu 3'de Çıkan Hata Mesajı;
Kod: Tümünü seç
[phpBB Debug] PHP Notice: in file /thanks.php on line 147: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 148: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 149: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 150: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4000: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4002: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4003: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4004: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)


Konu 4'de Çıkan Hata Mesajı;
Kod: Tümünü seç
[phpBB Debug] PHP Notice: in file /thanks.php on line 147: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 148: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 149: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /thanks.php on line 150: Undefined index: 3199
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4000: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4002: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4003: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4004: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3312)


Soru/hatadan önce ne değişiklik yaptınız:
Sorundan önce değişiklikte bulunmadım. Sorun yaklaşık olarak 8-10 aydır var.


Kendi düşüncem şu şekilde, konularda bulunan tek ortak nokta şu, daha önceden siteye üye olan ama tarafımdan mesajları haricinde üyeliği silinen üyenin mesajlara teşekkür etmesi. Denemek için bu misafirin iletiye yaptığı teşekkürü nasıl kaldırabilirim ki?
Örnek Resim:
tesekkur.JPG
tesekkur.JPG (8.04 KB) 2509 defa görüntülendi
basoglanh
kullanıcı
kullanıcı

İleti: 308
Kayıt: 30 Ağu 2007 23:30
Konum: Muğla
İsim: Hüseyin
HTML: İyi
CSS: Başlangıç
PHP: Orta
phpBB3: Orta
Sürüm: PhpBB 3.0.5

Re: Bazı Konularda Çıkan Farklı Hata Mesajları

İleti ALEXIS 21 Arl 2010 16:13

thanks.php satır 3199 civarı neler var? "Undefined index" hatasına genelde olmayan bir array elamanı çağırıldığında ortaya çıkar.
ALEXIS
yönetici
yönetici

Kullanıcı avatarı

İleti: 3628
Kayıt: 03 Arl 2006 08:57
HTML: Çok iyi
CSS: İyi
PHP: İyi
phpBB3: Çok iyi
Sürüm: phpBB 3

Re: Bazı Konularda Çıkan Farklı Hata Mesajları

İleti basoglanh 21 Arl 2010 16:19

Notepad ++ ile thanks.php'ye baktığımda son satır 353 olarak görünüyor.
Aşağıda thanks.php var.

İçeriği;
Kod: Tümünü seç
<?php
/**
*
* @package phpBB3
* @version $Id: thanks.php 1008 2009-10-12 21:06:04Z angelside $
* @copyright (c) 2007 Geoffreak
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
   exit;
}
define('THANKS_TABLE', $table_prefix . 'thanks');

// create an array of all users
$sql = 'SELECT *
   FROM ' . USERS_TABLE;
$result = $db->sql_query($sql);
$users = array();
while ($row = $db->sql_fetchrow($result))
{
   if ((!isset($row['user_thanked']) || !isset($row['user_thanked_others'])) && $user->data['user_type'] == USER_FOUNDER)
   {
      install_040();
   }
   $users[$row['user_id']] = array(
      'username'          => $row['username'],
      'user_id'          => $row['user_id'],
      'user_colour'       => $row['user_colour'],
      'user_gender'       => (isset($row['user_gender'])) ?  $row['user_gender'] : false,
      'thanks_give'      => (isset($row['user_thanked_others'])) ? $row['user_thanked_others'] : 0,
      'thanks_receive'   => (isset($row['user_thanked'])) ? $row['user_thanked'] : 0,
   );
}
$db->sql_freeresult($result);

// Do stuff based on header variables
// Two variables are needed to avoid accidental refresh errors
if (isset($_REQUEST['thanks']) && !isset($_REQUEST['rthanks']))
{
   insert_thanks(request_var('thanks', 0), $user->data['user_id']);
}
if (isset($_REQUEST['rthanks']) && !isset($_REQUEST['thanks']))
{
   delete_thanks(request_var('rthanks', 0), $user->data['user_id']);
}


// create an array of all thanks info
$sql = 'SELECT *
   FROM ' . THANKS_TABLE;
$result = $db->sql_query($sql);
$thankers = array();
$i = 0;
while ($row = $db->sql_fetchrow($result))
{
   $thankers[$i] = array( 
      'user_id' => $row['user_id'],
      'post_id' => $row['post_id'],
   );
   $i++;
}
$db->sql_freeresult($result);

function install_040()
{
   global $db, $user;
   $sql = 'SELECT *
      FROM ' . POSTS_TABLE;
   $result = $db->sql_query($sql);
   $posts_arr = array();
   while ($row = $db->sql_fetchrow($result))
   {
      $posts_arr[$row['poster_id']][] = $row['post_id'];
   }
   $db->sql_freeresult($result);
   
   $sql = 'SELECT *
      FROM ' . USERS_TABLE;
   $result = $db->sql_query($sql);
   $users_thanked = array();
   $users_thanked_others = array();
   while ($row = $db->sql_fetchrow($result))
   {
      $users_thanked[$row['user_id']] = 0;
      $users_thanked_others[$row['user_id']] = 0;
   }
   $db->sql_freeresult($result);
   
   $sql = 'ALTER TABLE `' . USERS_TABLE . '` ADD `user_thanked` INT NOT NULL ;';
   $db->sql_query($sql);
   $sql = 'ALTER TABLE `' . USERS_TABLE . '` ADD `user_thanked_others` INT NOT NULL ;';
   $db->sql_query($sql);

   foreach ($users_thanked as $this_user_id => $thanks_count)
   {
      if (isset($posts_arr[$this_user_id]) && is_array($posts_arr[$this_user_id]))
      {
         foreach ($posts_arr[$this_user_id] as $key2 => $this_post_id)
         {
            foreach ($thankers as $key => $values)
            {
               if ($values['post_id'] == $this_post_id)
               {
                  $users_thanked[$this_user_id]++;
               }
            }
         }
      }
      foreach ($thankers as $key => $values)
      {
         if ($values['user_id'] == $this_user_id)
         {
            $users_thanked_others[$this_user_id]++;
         }
      }
      $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
         'user_thanked'         => $users_thanked[$this_user_id],
         'user_thanked_others'   => $users_thanked_others[$this_user_id],
      )) . " WHERE user_id = $this_user_id";
      $db->sql_query($sql);
   }
   $sql2 = 'INSERT INTO ' . CONFIG_TABLE . ' ' . $db->sql_build_array('INSERT', array(
      'config_name'   => 'thanks_version',
      'config_value'   => '0.4.0',
   ));
   $db->sql_query($sql2);
   trigger_error($user->lang['TP_040_UPGRADED']);
}


// Output thanks list
function get_thanks($post_id)
{
   global $db, $users, $poster_id, $thankers;
   $return = '';
    $user_list = array();
   foreach($thankers as $key => $value)
   {
      if ($thankers[$key]['post_id'] == $post_id && $thankers[$key]['user_id'] != $poster_id)
      {
         $user_list[ strtolower( $users[$thankers[$key]['user_id']]['username'] ) ] = array(
            'username' => $users[$thankers[$key]['user_id']]['username'],
            'user_id' => $users[$thankers[$key]['user_id']]['user_id'],
            'user_colour' => $users[$thankers[$key]['user_id']]['user_colour'],
         );
      }
   }
   ksort($user_list);
   $i = 0;
   foreach($user_list as $key => $value)
   {
      if ($i > 0)
      {
         $return .= ', ';
      }
      $i++;
      $return .= get_username_string('full', $value['user_id'], $value['username'], $value['user_colour'], $value['username']);
   }
   $return = ($return == '') ? false : $return;
   return $return;
}
function get_thanks_number($post_id)
{
   global $db, $thankers;
   $i = 0;
   foreach($thankers as $key => $value)
   {
      if ($thankers[$key]['post_id'] == $post_id)
      {
         $i++;
      }
   }
   return $i;
}
// add a user to the thanks list
function insert_thanks($post_id, $user_id)
{
   global $db, $users;
   if ($user_id != ANONYMOUS)
   {   
      $sql = 'SELECT *
         FROM ' . THANKS_TABLE . "
         WHERE post_id = $post_id
            AND user_id = $user_id
         LIMIT 1";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $db->sql_freeresult($result);
      
      $to_id = request_var('to_id', 0);
      if (empty($row) && !empty($to_id))
      {
         $sql2 = 'INSERT INTO ' . THANKS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
            'user_id'   => $user_id,
            'post_id'   => $post_id
         ));
         $db->sql_query($sql2);
         $users[$user_id]['thanks_give'] += 1;
         $users[$to_id]['thanks_receive'] += 1;
         $sql1 = 'UPDATE ' . USERS_TABLE . '
            SET user_thanked_others = ' . $users[$user_id]['thanks_give'] . "
            WHERE user_id = $user_id";
         $sql3 = 'UPDATE ' . USERS_TABLE . '
            SET user_thanked = ' . $users[$to_id]['thanks_receive'] . "
            WHERE user_id = $to_id";
         $db->sql_query($sql1);
         $db->sql_query($sql3);
      }
   }
}
// remove a user's thanks
function delete_thanks($post_id, $user_id)
{
   global $db, $user, $users;
   if ($user_id != ANONYMOUS)
   {
      $sql = 'SELECT *
         FROM ' . THANKS_TABLE . "
         WHERE post_id = $post_id AND user_id = $user_id
         LIMIT 1";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $db->sql_freeresult($result);

      $to_id = request_var('to_id', 0);
      if (!empty($row) && !empty($to_id))
      {
         $sql = "DELETE FROM " . THANKS_TABLE . "
            WHERE post_id = $post_id AND user_id = " . $user->data['user_id'];
         $db->sql_query($sql);
         $users[$user_id]['thanks_give'] -= 1;
         $users[$to_id]['thanks_receive'] -= 1;
         $sql1 = 'UPDATE ' . USERS_TABLE . '
            SET user_thanked_others = ' . $users[$user_id]['thanks_give'] . "
            WHERE user_id = $user_id";
         $sql3 = 'UPDATE ' . USERS_TABLE . '
            SET user_thanked = ' . $users[$to_id]['thanks_receive'] . "
            WHERE user_id = $to_id";
         $db->sql_query($sql1);
         $db->sql_query($sql3);
      }
   }
}
// display the text/image saying either to add or remove thanks
function get_thanks_text($post_id)
{
   global $db, $user, $postrow;
   if (already_thanked($post_id, $user->data['user_id']))
   {
      $postrow = array_merge($postrow, array(
         'THANK_ALT'      => $user->lang['REMOVE_THANKS'],
         'THANK_ALT2'   => $user->lang['THANK_POST2'],
         'THANKS_IMG'   => '/removethanks.gif',
      ));
      return;
   }
   $postrow = array_merge($postrow, array(
      'THANK_ALT'      => $user->lang['THANK_POST1'],
      'THANK_ALT2'   => $user->lang['THANK_POST2'],
      'THANKS_IMG'   => '/thankposts.gif',
   ));
   return;
}
// change the variable sent via the link to avoid odd errors
function get_thanks_link($post_id)
{
   global $db, $user;
   if (already_thanked($post_id, $user->data['user_id']))
   {
      return 'rthanks';
   }
   return 'thanks';
}
// check if the user has already thanked that post
function already_thanked($post_id, $user_id)
{
   global $db, $thankers;
   $thanked = false;
   foreach($thankers as $key => $value)
   {
      if ($thankers[$key]['post_id'] == $post_id && $thankers[$key]['user_id'] == $user_id)
      {
         $thanked = true;
      }
   }
   return $thanked;
}
// check gender in applicable
function get_gender($user_id)
{
   global $users, $user;
   if ($user_id == ANONYMOUS || $users[$user_id]['user_gender'] == false)
   {
      return $user->lang['THANK_GENDER_U'];
   }
   else if ($users[$user_id]['user_gender'] == 1)
   {
      return $user->lang['THANK_GENDER_M'];
   }
   else if ($users[$user_id]['user_gender'] == 2)
   {
      return $user->lang['THANK_GENDER_F'];
   }
   return $user->lang['THANK_GENDER_U'];
}
// gets the number of users that have thanked the poster
function get_user_count($user_id, $receive)
{
   global $users;
   if ($receive)
   {
      return $users[$user_id]['thanks_receive'];
   }
   else
   {
      return $users[$user_id]['thanks_give'];
   }
}
// stuff goes here to avoid over-editing viewtopic.php
function output_thanks($user_id)
{
   global $db, $user, $poster_id, $postrow, $row, $phpEx, $topic_data, $phpbb_root_path;
   if (!empty($postrow))
   {
      $forum_id = (isset($forum_id)) ? $forum_id : 0;
      $number = get_thanks_number($row['post_id']) . ' ';
      $pl_text = $user->lang['THANK_TEXT_2pl'];
      if ($number == 1)
      {
         $pl_text = $user->lang['THANK_TEXT_2'];
         $number = '';
      }
      get_thanks_text($row['post_id']);
      $postrow = array_merge($postrow, array(
         'THANKS_GENDER'       => ' ' . get_gender($user_id),
         'THANKS'            => get_thanks($row['post_id']),
         //'THANKS_LINK'         => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&amp;f=' . $forum_id : '') . '&amp;' . get_thanks_link($row['post_id']) . '=' . $row['post_id'] . '&amp;to_id=' . $poster_id . '#p' . $row['post_id'],
         'THANKS_LINK'         => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id'] . (($topic_data['topic_type'] == POST_GLOBAL) ? '&amp;f=' . $forum_id : '') . '&amp;' . get_thanks_link($row['post_id']) . '=' . $row['post_id'] . '&amp;to_id=' . $poster_id) . '#p' . $row['post_id'],         
         'THANK_TEXT'         => $number . ' ' . $user->lang['THANK_TEXT_1'] . $pl_text . ' ',
         'POSTER_RECEIVE_COUNT'   => get_user_count($poster_id, true),
         'POSTER_GIVE_COUNT'      => get_user_count($poster_id, false),
         'S_IS_OWN_POST'         => ($user->data['user_id'] == $poster_id) ? true : false,
      ));
   }
}

?>


İndir:
thanks.php.zip
(2.65 KB) 36 defa indirildi
basoglanh
kullanıcı
kullanıcı

İleti: 308
Kayıt: 30 Ağu 2007 23:30
Konum: Muğla
İsim: Hüseyin
HTML: İyi
CSS: Başlangıç
PHP: Orta
phpBB3: Orta
Sürüm: PhpBB 3.0.5

Re: Bazı Konularda Çıkan Farklı Hata Mesajları

İleti basoglanh 14 Oca 2011 20:37

ALEXIS yazdı:thanks.php satır 3199 civarı neler var? "Undefined index" hatasına genelde olmayan bir array elamanı çağırıldığında ortaya çıkar.


Sorun 3199 id nolu üyenin (silinmiş üye [misafir]) ettiği teşekkürlerden kaynaklanıyormuş, phpmyadminde phpbb_thanks tablosu içerisinde;

Kod: Tümünü seç
SELECT * FROM `phpbb_thanks` WHERE `user_id` = "3199"


kodunu çalıştırdım ve tüm teşekkürleri toplu halde sildim, sorun misafirin teşekkürleri gittikten sonra düzeldi.


Aynı sorunun yenilenmemesi için google adsense [bot] teşekkürlerinide kaldrımam gerekli. Ve teşekkür etmesini engellenemem gerekli bunun için ne yapabilirim. adsense botun üye id'si nedir bulamadım.
basoglanh
kullanıcı
kullanıcı

İleti: 308
Kayıt: 30 Ağu 2007 23:30
Konum: Muğla
İsim: Hüseyin
HTML: İyi
CSS: Başlangıç
PHP: Orta
phpBB3: Orta
Sürüm: PhpBB 3.0.5

Re: Bazı Konularda Çıkan Farklı Hata Mesajları

İleti DonkanShinigami 29 Tem 2011 15:12

Kod: Tümünü seç
DELETE FROM `phpbb_thanks` WHERE `user_id` = "3199"


yapmanız daha kısa sürerdi :D adsense botunun userid sini phpbb_users tablosundan bulabilirsiniz.
DonkanShinigami
kullanıcı
kullanıcı

İleti: 100
Kayıt: 19 Eyl 2010 23:58
İsim: Fırat Akandere
HTML: Çok iyi
CSS: İyi
PHP: İyi
phpBB3: Çok iyi
Sürüm: phpBB3 3.0.8


Hata Mesajları


Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 1 misafir

cron