MyBB Destek Forumu

Orjinalini görmek için tıklayınız: etiket sistemi cpu sorunu
Şu anda (Arşiv) modunu görüntülemektesiniz. Orjinal Sürümü Görüntüle internal link
Sayfalar: 1 2 3
etiket sisteminin asırı cpu tükettiği bildirildi host tarafından bu eklentinin genel bir sorunu malesef asırı cpu tüketiyor

hata kayıtlarını incelediğimde hepsi 166. satır işaret ediyor
Kod:
[23-Jun-2011 01:02:41] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[23-Jun-2011 01:20:06] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[23-Jun-2011 13:51:03] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[23-Jun-2011 18:27:49] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[23-Jun-2011 19:46:14] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[24-Jun-2011 04:30:26] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[24-Jun-2011 16:37:02] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[24-Jun-2011 17:57:34] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[24-Jun-2011 20:24:24] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:41:54] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:44:31] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:44:51] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:45:51] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:46:22] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:46:55] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:48:28] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:49:49] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:52:49] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:53:03] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:53:44] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:54:21] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:56:20] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:56:44] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:58:38] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 01:59:37] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 02:32:49] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 02:48:41] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 02:48:42] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 02:52:04] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 06:59:10] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 07:40:00] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[25-Jun-2011 18:03:00] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[26-Jun-2011 00:34:22] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[26-Jun-2011 00:34:35] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[26-Jun-2011 01:20:48] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[26-Jun-2011 01:20:49] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[26-Jun-2011 02:24:05] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[26-Jun-2011 23:31:41] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 06:16:23] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 06:17:57] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 12:26:35] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 12:26:39] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 12:39:05] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 12:42:13] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[27-Jun-2011 20:53:19] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166
[28-Jun-2011 08:15:21] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/hepimizb/public_html/forum/etiketler.php on line 166

166. satırda yazanlar ise şu şekilde
Kod:
$wymiar = getimagesize($for2);


ilgili bölümde [img] bbcodu ile alakalı kodlar görünmekte

Kod:
//IMG CHANGE!!//
        $preg = preg_match_all("/\[img\]([^\[]+?)\[\/img\]/is", $tekst, $msimg);
    $i = 0;
    $obrazki = array();

    if($preg){
    
        foreach($msimg as $for1)
        {
            foreach($for1 as $for2)
            {
                if(!strstr($for2, "[img]") || strstr($for2, "[IMG]"))
                {                            

                            
                        $for2_len = strlen($for2);
                        
                        if(substr($for2, ($for2_len-5), $for2_len) == ".html" || substr($for2, ($for2_len-4), $for2_len) == ".php") // fast solution need to be remaked :D
                            continue 1;
                        
                        if (!@fclose(@fopen($for2, "r")))
                            continue 1;
                            
                        $wymiar = getimagesize($for2);
                        $for2_save = $for2;

                        $for2 = str_replace("/", "\\/", $for2); //zamiana linkow do obrazka :>
                        if($wymiar[0] > 200)
                        {
                            $ile_procent = (200 * 100) / $wymiar[0];
                            $ile_procent = (int) $ile_procent;
                            $wymiar[0] = 200;
                            $wymiar[1] = (int) $wymiar[1] * ($ile_procent / 100);
                            $wymiar[1] = (int) $wymiar[1];
                            $tekst = preg_replace('#\[img\]'.$for2.'\[/img\]#si','<img src="'.$for2_save.'" alt="" width="'.$wymiar[0].'" height="'.$wymiar[1].'">',$tekst);
                        
                        }elseif($wymiar[1] > 150){
                            $ile_procent = (150 * 100) / $wymiar[1];
                            $ile_procent = (int) $ile_procent;        
                            $wymiar[1] = 150;
                            $wymiar[0] = $wymiar[0] * ($ile_procent / 100);
                            $wymiar[0] = (int) $wymiar[0];

                            $tekst = preg_replace('#\[img\]'.$for2.'\[/img\]#si','<img src="'.$for2_save.'" alt="" width="'.$wymiar[0].'" height="'.$wymiar[1].'">',$tekst);
                            
                        }else{
                            $tekst = preg_replace('#\[img\]'.$for2.'\[/img\]#si','<img src="'.$for2.'" alt="">',$tekst);
                        }
                        
                        //Dont know if it is good I'm not good at it:<

                }
            }
        }

    }
    
    /***********************IMG END*******************************/


bu bölümünden cpu kasmasını engellemek için düzenleme yapılabilirmi
evet etiket gösterimlerindeki resimleri devre dışı bırakın , etiket sisteminin sorunu bu zaten..

örnek resimleri devre dışı bırakınca hem kasmıyor hemde daha hızlı açılmasını sağlıyor..

Kod:
http://forum.tasarimaster.com/etiket/Eklenti.html
resimleri nasıl devre dısı bırakıyoruz.
En sonda vermiş olduğunuz kod'da şu kısmı bulun ve silin yani boş kalsın orası.

PHP Kod:
<img src="'.$for2.'" alt=""


Kodun tamamı:

PHP Kod:
$tekst preg_replace('#\[img\]'.$for2.'\[/img\]#si','<img src="'.$for2.'" alt="">',$tekst); 


Yapmanız Gereken:

PHP Kod:
$tekst preg_replace('#\[img\]'.$for2.'\[/img\]#si','BOŞ',$tekst); 
yapmanız gereken diye kod vermişsiniz fakat 'BOŞ' yazmış olduğubuz yer sadece '' olacak yanlış anlamadım dimi
Aynen hocam, boş kelimesinide silin ordan.
teşekküler hosta bildiricem güncellemeyi takip etsinler bakalım nasıl bir gelişme olacak
Sayfalar: 1 2 3