Questo articolo è un articolo speculare di traduzione automatica, clicca qui per saltare all'articolo originale.

Vista: 12990|Risposta: 5

[Web] Errori che si verificano spesso sui server web, di seguito il registro degli errori per le query lente

[Copiato link]
Pubblicato su 30/11/2014 21:09:51 | | |
[30-Nov-2014 20:22:25]  [piscina www] PID 10383
script_filename = /test/forum.php
[0x00007fe08a61eba8] curl_exec() /test/source/function/function_filesock.php:68
[0x00007fe08a61e960] _dfsockopen() /test/source/function/function_core.php:201
[0x00007fe08a61e7c0] dfsockopen() /test/source/class/class_image.php:123
[0x00007fe08a61e608] init() /test/source/class/class_image.php:45
[0x00007fe08a61e2a8] Thumb() /test/source/function/function_block.php:410
[0x00007fe08a61e038] block_template() /test/source/function/function_block.php:177
[0x00007fe08a61def8] block_fetch_content() /test/sorgente/funzione/function_block.php:120
[0x00007fe08a61de18] block_display_batch() /test/source/function/function_core.php:804
[0x00007fe08a61dbd0] block_display() /test/data/template/3_diy_forum_discuz.tpl.php:29
[0x00007fe08a61d828] +++ dump fallito

[30-Nov-2014 20:22:26]  [piscina www] PID 10392
script_filename = /test/forum.php
[0x00007fe08a61eba8] curl_exec() /test/source/function/function_filesock.php:68
[0x00007fe08a61e960] _dfsockopen() /test/source/function/function_core.php:201
[0x00007fe08a61e7c0] dfsockopen() /test/source/class/class_image.php:123
[0x00007fe08a61e608] init() /test/source/class/class_image.php:45
[0x00007fe08a61e2a8] Thumb() /test/source/function/function_block.php:410
[0x00007fe08a61e038] block_template() /test/source/function/function_block.php:177
[0x00007fe08a61def8] block_fetch_content() /test/sorgente/funzione/function_block.php:120
[0x00007fe08a61de18] block_display_batch() /test/source/function/function_core.php:804
[0x00007fe08a61dbd0] block_display() /test/data/template/3_diy_forum_discuz.tpl.php:29
[0x00007fe08a61d828] +++ dump fallito


Sai qual è la causa di questo errore, e l'esecuzione lenta della query registrerà questo errore per più di 5 secondi, server nginx e php-fpm





Precedente:Ti insegnerà a capire rapidamente la funzione file di Discuz!, e da ora in poi non dovrai più chiedere aiuto per modificare i file
Prossimo:[Indispensabile per acquistare biglietti del treno] 12306 Bypass versione verde per prendere biglietti di deviazione v1.5
Pubblicato su 01/12/2014 12:20:49 |
[0x00007fe08a61eba8] curl_exec() /test/source/function/function_filesock.php:68 C'è un errore sulla riga 68, che può solo aiutare :L
 Padrone di casa| Pubblicato su 01/12/2014 13:45:36 |
Delver_Si Pubblicato il 1-12-2014 12:20
[0x00007fe08a61eba8] curl_exec() /test/source/function/function_filesock.php:68 C'è un errore sulla riga 68, solo ...

Tua sorella, so anche che questa frase è sbagliata, ma non so a cosa serva questo documento
Pubblicato su 01/12/2014 21:01:08 |
/test/source/function/function_filesock.php  源代码给我
 Padrone di casa| Pubblicato su 01/12/2014 21:14:41 |
Delver_Si Pubblicato il 1-12-2014 alle 21:01
/test/source/function/function_filesock.php  源代码给我

[mw_shl_code=php,true]<?php

/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* Questo NON è un freeware, l'uso è soggetto a termini di licenza
*
* $Id: function_filesock.php 34441 2014-04-29 07:47:26Z nemohou $
*/

if(!defined('IN_DISCUZ')) {
        uscita ('Accesso negato');
}

funzione _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSO, $ip = '', $timeout = 15, $block = VERO, $encodetype = 'URLENCODE', $allowcurl = VERO, $position = 0, $files = array( )) {
        $return = '';
        $matches = parse_url($url);
        $scheme = $matches['schema'];
        $host = $matches['ospite'];
        $path = $matches['sentiero'] ? $matches['sentiero']. ($matches['domanda']? '?'. $matches['interrogazione'] : '') : '/';
        $port = !vuoto($matches['porta']) ? $matches['porto'] : ($scheme == 'http' ? '80' : '');
        $boundary = $encodetype == 'URLENCODE' ? '' : casuale(40);

        se($post) {
                if(!is_array($post)) {
                        parse_str($post, $post);
                }
                _format_postkey($post, $postnew);
                $post = $postnew;
        }
        se(function_exists('curl_init') &&function_exists('curl_exec') &&$allowcurl) {
                $ch = curl_init();
                $httpheader = array();
                se($ip) {
                        $httpheader[] = "Conduttore: ".$host;
                }
                se($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, falso);
                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, falso);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, vero);
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, vero);
                curl_setopt($ch, CURLOPT_HEADER, 1);
                se($post) {
                        curl_setopt($ch, CURLOPT_POST, 1);
                        if($encodetype == 'URLENCODE') {
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
                        } altrimenti {
                                foreach($post as $k => $v) {
                                        if(isset($files[$k])) {
                                                $post[$k] = '@'.$files[$k];
                                        }
                                }
                                foreach($files come $k => $file) {
                                        if(!isset($post[$k]) && file_exists($file)) {
                                                $post[$k] = '@'.$file;
                                        }
                                }
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
                        }
                }
                se($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) {
                        ritorno;
                } altrimenti {
                        $GLOBALS['fileockheader'] = substr($data, 0, $status['header_size']);
                        $data = substr($data, $status['header_size']);
                        ritorna!$limit ? $data : substr($data, 0, $limit);
                }
        }

        se($post) {
                if($encodetype == 'URLENCODE') {
                        $data = http_build_query($post);
                } altrimenti {
                        $data = '';
                        foreach($post as $k => $v) {
                                $data .= "--$boundary\r\n";
                                $data .= 'Content-Disposition: form-data; name="'$k.'"'. (isset($files[$k])? '; filename="'.basename($files[$k]).'"; Tipo di contenuto: application/octet-stream' : '')." \r\n\r\n";
                                $data .= $v." \r\n";
                        }
                        foreach($files come $k => $file) {
                                if(!isset($post[$k]) && file_exists($file)) {
                                        if($fp = @fopen($file, 'r')) {
                                                $v = fread($fp, dimensione file($file));
                                                fclose($fp);
                                                $data .= "--$boundary\r\n";
                                                $data .= 'Content-Disposition: form-data; name="'.$k.'"; filename="'.basename($file).'"; Tipo di contenuto: applicazione/flusso di ottetto'." \r\n\r\n";
                                                $data .= $v." \r\n";
                                        }
                                }
                        }
                        $data .= "--$boundary\r\n";
                }
                $out = "POST $path HTTP/1.0\r\n";
                $header = "Accetta: */*\r\n";
                $header .= "Accetta-Linguaggio: zh-cn\r\n";
                $header .= $encodetype == 'URLENCODE' ? "Tipo-Contenuto: application/x-www-form-urlencoded\r\n" : "Tipo-Contenuto: multipart/data-forma; confine=$boundary\r\n";
                $header .= 'Contenuto di lunghezza: '.strlen($data)." \r\n";
                $header .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
                $header .= "Conduttore: $host:$port\r\n";
                $header .= "Connessione: Vicina\r\n";
                $header .= "Controllo della cache: no-cache\r\n";
                $header .= "Biscotto: $cookie\r\n\r\n";
                $out .= $header;
                $out .= $data;
        } altrimenti {
                $out = "OTTENERE $path HTTP/1.0\r\n";
                $header = "Accetta: */*\r\n";
                $header .= "Accetta-Linguaggio: zh-cn\r\n";
                $header .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
                $header .= "Conduttore: $host:$port\r\n";
                $header .= "Connessione: Vicina\r\n";
                $header .= "Biscotto: $cookie\r\n\r\n";
                $out .= $header;
        }

        $fpflag = 0;
        if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
                $context = array(
                        'http' => array(
                                'metodo' => $post ? 'POST' : 'GET',
                                'header' => $header,
                                'content' => $post,
                                'timeout' => $timeout,
                        ),
                );
                $context = stream_context_create($context);
                $fp = @fopen($scheme.'://'.( $ip? $ip : $host).':'.$port.$path, 'b', falso, $context);
                $fpflag = 1;
        }

        if(!$fp) {
                ritorno '';
        } altrimenti {
                stream_set_blocking($fp, $block);
                stream_set_timeout($fp, $timeout);
                @fwrite($fp, $out);
                $status = stream_get_meta_data($fp);
                se(!$status['timed_out']) {
                        mentre (!feof($fp) && !$fpflag) {
                                $header = @fgets($fp);
                                $headers .= $header;
                                if($header && ($header == "\r\n" ||  $header == "\n")) {
                                        pausa;
                                }
                        }
                        $GLOBALS['intestazione di fascicolo'] = $headers;

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

                        se($limit) {
                                $return = stream_get_contents($fp, $limit);
                        } altrimenti {
                                $return = stream_get_contents($fp);
                        }
                }
                @fclose($fp);
                ritorno $return;
        }
}

funzione _format_postkey($post, &$result, $key = '') {
        foreach($post as $k => $v) {
                $_k = $key ? $key.' ['.$k.']' : $k;
                se(is_array($v)) {
                        _format_postkey($v, $result, _k dollari);
                } altrimenti {
                        $result[$_k] = $v;
                }
        }
}

?>[/mw_shl_code]
Pubblicato su 02/12/2014 00:08:32 |
Non riesco a capire
Disconoscimento:
Tutto il software, i materiali di programmazione o gli articoli pubblicati dalla Code Farmer Network sono destinati esclusivamente all'apprendimento e alla ricerca; I contenuti sopra elencati non devono essere utilizzati per scopi commerciali o illegali, altrimenti gli utenti dovranno sostenere tutte le conseguenze. Le informazioni su questo sito provengono da Internet, e le controversie sul copyright non hanno nulla a che fare con questo sito. Devi eliminare completamente i contenuti sopra elencati dal tuo computer entro 24 ore dal download. Se ti piace il programma, ti preghiamo di supportare software autentico, acquistare la registrazione e ottenere servizi autentici migliori. In caso di violazione, vi preghiamo di contattarci via email.

Mail To:help@itsvse.com