Bu makale makine çevirisi ayna makalesidir, orijinal makaleye geçmek için lütfen buraya tıklayın.

Görünüm: 12990|Yanıt: 5

[Web] Web sunucularında sıkça meydana gelen hatalar aşağıda yavaş sorgular için hata kaydı yer almaktadır

[Bağlantıyı kopyala]
Yayınlandı 30.11.2014 21:09:51 | | |
[30-Kas-2014 20:22:25]  [havuz www] PID 10383
script_filename = /test/forum.php
[0x00007fe08a61eba8] curl_exec() /test/kaynak/fonksiyon/function_filesock.php:68
[0x00007fe08a61e960] _dfsockopen() /test/kaynak/fonksiyon/function_core.php:201
[0x00007fe08a61e7c0] dfsockopen() /test/kaynak/sınıf/class_image.php:123
[0x00007fe08a61e608] init() /test/kaynak/sınıf/class_image.php:45
[0x00007fe08a61e2a8] Thumb() /test/source/function/function_block.php:410
[0x00007fe08a61e038] block_template() /test/kaynak/fonksiyon/function_block.php:177
[0x00007fe08a61def8] block_fetch_content() /test/kaynak/fonksiyon/function_block.php:120
[0x00007fe08a61de18] block_display_batch() /test/kaynak/fonksiyon/function_core.php:804
[0x00007fe08a61dbd0] block_display() /test/veri/şablon/3_diy_forum_discuz.tpl.php:29
[0x00007fe08a61d828] +++ dump başarısız oldu

[30-Kas-2014 20:22:26]  [havuz www] PID 10392
script_filename = /test/forum.php
[0x00007fe08a61eba8] curl_exec() /test/kaynak/fonksiyon/function_filesock.php:68
[0x00007fe08a61e960] _dfsockopen() /test/kaynak/fonksiyon/function_core.php:201
[0x00007fe08a61e7c0] dfsockopen() /test/kaynak/sınıf/class_image.php:123
[0x00007fe08a61e608] init() /test/kaynak/sınıf/class_image.php:45
[0x00007fe08a61e2a8] Thumb() /test/source/function/function_block.php:410
[0x00007fe08a61e038] block_template() /test/kaynak/fonksiyon/function_block.php:177
[0x00007fe08a61def8] block_fetch_content() /test/kaynak/fonksiyon/function_block.php:120
[0x00007fe08a61de18] block_display_batch() /test/kaynak/fonksiyon/function_core.php:804
[0x00007fe08a61dbd0] block_display() /test/veri/şablon/3_diy_forum_discuz.tpl.php:29
[0x00007fe08a61d828] +++ dump başarısız oldu


Bu hatanın nedenini biliyorsunuz ve yavaş sorgu yürütme bu hatayı 5 saniyeden fazla kaydeder, sunucu nginx ve php-fpm





Önceki:Discuz!'un dosya işlevini hızlıca anlamanızı sağlar ve bundan sonra dosyaları değiştirmek için yardım istemenize gerek kalmaz
Önümüzdeki:[Tren bileti almak için mutlaka sahip olunmalı] 12306 Bypass saptırma bileti kapma v1.5 yeşil versiyon
Yayınlandı 1.12.2014 12:20:49 |
[0x00007fe08a61eba8] curl_exec() /test/source/function/function_filesock.php:68 68. satırda bir hata var, bu sadece yardımcı olabilir :L
 Ev sahibi| Yayınlandı 1.12.2014 13:45:36 |
Delver_Si 2014-12-1 tarihinde yayınlandı 12:20
[0x00007fe08a61eba8] curl_exec() /test/kaynak/fonksiyon/function_filesock.php:68 68. satırda bir hata var, sadece ...

Kız kardeşin, bu satırın yanlış olduğunu da biliyorum ama bu belgenin ne için olduğunu bilmiyorum
Yayınlandı 1.12.2014 21:01:08 |
/test/source/function/function_filesock.php  源代码给我
 Ev sahibi| Yayınlandı 1.12.2014 21:14:41 |
Delver_Si 2014-12-1 tarihinde yayınlandı 21:01
/test/source/function/function_filesock.php  源代码给我

[mw_shl_code=php,doğru]<?php

/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* Bu ücretsiz bir yazılım değildir, kullanım lisans şartlarına tabidir
*
* $Id: function_filesock.php 34441 2014-04-29 07:47:26Z nemohou $
*/

if(!defined('IN_DISCUZ')) {
        exit('Erişim Reddedildi');
}

fonksiyon _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = YANLI, $ip = '', $timeout = 15, $block = TRUE, $encodetype = 'URLENCODE', $allowcurl = TRUE, $position = 0, $files = dizi( )) {
        $return = '';
        $matches = parse_url($url);
        $scheme = $matches['şema'];
        $host = $matches['ev sahibi'];
        $path = $matches['path'] ? $matches['path']. ($matches['sorgu'] ? '?'. $matches['sorgu'] : '') : '/';
        $port = !boş($matches['port']) ? $matches['port'] : ($scheme == 'http' ? '80' : '');
        $boundary = $encodetype == 'URLENCODE' ? '' : rastgele(40);

        if($post) {
                if(!is_array($post)) {
                        parse_str($post, $post);
                }
                _format_postkey($post, $postnew);
                $post = $postnew;
        }
        if(function_exists('curl_init') && function_exists('curl_exec') && $allowcurl) {
                $ch = curl_init();
                $httpheader = dizi(dizi);
                if($ip) {
                        $httpheader[] = "Ev sahibi: ".$host;
                }
                if($httpheader) {
                        curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
                }
                curl_setopt($ch, CURLOPT_URL, $scheme.'://'.( $ip? $ip : $host). ($port ? ':'.$port : '').$path);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, yanlış);
                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, yanlış);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, doğru);
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, doğru);
                curl_setopt($ch, CURLOPT_HEADER, 1);
                if($post) {
                        curl_setopt($ch, CURLOPT_POST, 1);
                        if($encodetype == 'URLENCODE') {
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
                        } else {
                                foreach($post as $k => $v) {
                                        if(isset($files[$k])) {
                                                $post[$k] = '@'.$files[$k];
                                        }
                                }
                                foreach($files as $k => $file) {
                                        if(!isset($post[$k]) & & file_exists($file)) {
                                                $post[$k] = '@'.$file;
                                        }
                                }
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
                        }
                }
                if($cookie) {
                        curl_setopt($ch, CURLOPT_COOKIE, $cookie);
                }
                curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
                curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
                $data = curl_exec($ch);
                $status = curl_getinfo($ch);
                $errno = curl_errno($ch);
                curl_close($ch);
                if($errno || $status['http_code'] != 200) {
                        Dönüş;
                } else {
                        $GLOBALS['filesockheader'] = substr($data, 0, $status['header_size']);
                        $data = substr($data, $status['header_size']);
                        geri dön !$limit ? $data : substr($data, 0, $limit);
                }
        }

        if($post) {
                if($encodetype == 'URLENCODE') {
                        $data = http_build_query($post);
                } else {
                        $data = '';
                        foreach($post as $k => $v) {
                                $data .= "--$boundary\r\n";
                                $data .= 'İçerik-Yerleşim: form-veri; name="'.$k.'"''. (isset($files[$k]) ? '; filename="'.basename($files[$k]).'"; İçerik Türü: uygulama/oktet-akış' : '')." \r\n\r\n";
                                $data .= $v." \r\n";
                        }
                        foreach($files as $k => $file) {
                                if(!isset($post[$k]) & & file_exists($file)) {
                                        if($fp = @fopen($file, 'r')) {
                                                $v = fread($fp, filesize($file));
                                                fclose($fp);
                                                $data .= "--$boundary\r\n";
                                                $data .= 'İçerik-Yerleşim: form-veri; name="'.$k.'"; filename="'.basename($file).'"; İçerik Türü: uygulama/oktet-akış'." \r\n\r\n";
                                                $data .= $v." \r\n";
                                        }
                                }
                        }
                        $data .= "--$boundary\r\n";
                }
                $out = "HTTP/1.0\r\n$path GÖNDER";
                $header = "Kabul et: */*\r\n";
                $header .= "Kabul Dili: zh-cn\r\n";
                $header .= $encodetype == 'URLENCODE' ? "İçerik-Türü: application/x-www-form-urlencoded\r\n" : "İçerik Türü: çok parçalı/form-veri; sınır=$boundary\r\n";
                $header .= 'İçerik Uzunluğu: '.strlen($data)." \r\n";
                $header .= "Kullanıcı-Ajan: $_SERVER[HTTP_USER_AGENT]\r\n";
                $header .= "Sunucu: $host:$port\r\n";
                $header .= "Bağlantı: Yakın\r\n";
                $header .= "Önbellek Kontrolü: önbellek yok\r\n";
                $header .= "Kurabiye: $cookie\r\n\r\n";
                $out .= $header;
                $out .= $data;
        } else {
                $out = "HTTP/1.0\r\n$path GET GET";
                $header = "Kabul et: */*\r\n";
                $header .= "Kabul Dili: zh-cn\r\n";
                $header .= "Kullanıcı-Ajan: $_SERVER[HTTP_USER_AGENT]\r\n";
                $header .= "Sunucu: $host:$port\r\n";
                $header .= "Bağlantı: Yakın\r\n";
                $header .= "Kurabiye: $cookie\r\n\r\n";
                $out .= $header;
        }

        $fpflag = 0;
        if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
                $context = dizi(
                        'http' => dizi(
                                'yöntem' => $post ? 'POST' : 'ALIN',
                                'header' => $header,
                                'içerik' => $post,
                                'mola aşması' => $timeout,
                        ),
                );
                $context = stream_context_create($context);
                $fp = @fopen($scheme.'://'.( $ip? $ip : $host).':'.$port.$path, 'b', yanlış, $context);
                $fpflag = 1;
        }

        if(!$fp) {
                return '';
        } else {
                stream_set_blocking($fp, $block);
                stream_set_timeout($fp, $timeout);
                @fwrite($fp, $out);
                $status = stream_get_meta_data($fp);
                if(!$status['timed_out']) {
                        while (!feof($fp) && !$fpflag) {
                                $header = @fgets($fp);
                                $headers .= $header;
                                if($header && ($header == "\r\n" ||  $header == "\n")) {
                                        mola;
                                }
                        }
                        $GLOBALS['filesockheader'] = $headers;

                        if($position) {
                                for($i=0; $i<$position; $i++) {
                                        $char = fgetc($fp);
                                        if($char == "\n" && $oldchar != "\r") {
                                                $i++;
                                        }
                                        $oldchar = $char;
                                }
                        }

                        if($limit) {
                                $return = stream_get_contents($fp, $limit);
                        } else {
                                $return = stream_get_contents($fp);
                        }
                }
                @fclose($fp);
                $return dön;
        }
}

fonksiyon _format_postkey($post, &$result, $key = '') {
        foreach($post as $k => $v) {
                $_k = $key ? $key.' ['.$k.']' : $k;
                if(is_array($v)) {
                        _format_postkey($v, $result, _k dolar);
                } else {
                        $result[$_k] = $v;
                }
        }
}

?>[/mw_shl_code]
Yayınlandı 2.12.2014 00:08:32 |
Anlayamıyorum
Feragatname:
Code Farmer Network tarafından yayımlanan tüm yazılım, programlama materyalleri veya makaleler yalnızca öğrenme ve araştırma amaçları içindir; Yukarıdaki içerik ticari veya yasa dışı amaçlarla kullanılamaz, aksi takdirde kullanıcılar tüm sonuçları ödemelidir. Bu sitedeki bilgiler internetten alınmakta olup, telif hakkı anlaşmazlıklarının bu siteyle hiçbir ilgisi yoktur. Yukarıdaki içeriği indirmeden sonraki 24 saat içinde bilgisayarınızdan tamamen silmelisiniz. Programı beğendiyseniz, lütfen orijinal yazılımı destekleyin, kayıt satın alın ve daha iyi orijinal hizmetler alın. Herhangi bir ihlal olursa, lütfen bizimle e-posta yoluyla iletişime geçin.

Mail To:help@itsvse.com