Šis raksts ir mašīntulkošanas spoguļraksts, lūdzu, noklikšķiniet šeit, lai pārietu uz oriģinālo rakstu.

Skats: 12990|Atbildi: 5

[Tīmeklis] Kļūdas, kas bieži rodas tīmekļa serveros, zemāk ir lēnu vaicājumu kļūdu žurnāls

[Kopēt saiti]
Publicēts 30.11.2014 21:09:51 | | |
[30-Nov-2014 20:22:25]  [baseins www] PID 10383
script_filename = /tests/forum.php
[0x00007fe08a61eba8] curl_exec() /tests/avots/funkcija/function_filesock.php:68
[0x00007fe08a61e960] _dfsockopen() /tests/avots/funkcija/function_core.php:201
[0x00007fe08a61e7c0] dfsockopen() /tests/avots/klase/class_image.php:123
[0x00007fe08a61e608] init() /tests/avots/klase/class_image.php:45
[0x00007fe08a61e2a8] Īkšķis() /tests/avots/funkcija/function_block.php:410
[0x00007fe08a61e038] block_template() /tests/avots/funkcija/function_block.php:177
[0x00007fe08a61def8] block_fetch_content() /tests/avots/funkcija/function_block.php:120
[0x00007fe08a61de18] block_display_batch() /tests/avots/funkcija/function_core.php:804
[0x00007fe08a61dbd0] block_display() /tests/dati/veidne/3_diy_forum_discuz.tpl.php:29
[0x00007fe08a61d828] +++ izmete neizdevās

[30-Nov-2014 20:22:26]  [Baseins www] PID 10392
script_filename = /tests/forum.php
[0x00007fe08a61eba8] curl_exec() /tests/avots/funkcija/function_filesock.php:68
[0x00007fe08a61e960] _dfsockopen() /tests/avots/funkcija/function_core.php:201
[0x00007fe08a61e7c0] dfsockopen() /tests/avots/klase/class_image.php:123
[0x00007fe08a61e608] init() /tests/avots/klase/class_image.php:45
[0x00007fe08a61e2a8] Īkšķis() /tests/avots/funkcija/function_block.php:410
[0x00007fe08a61e038] block_template() /tests/avots/funkcija/function_block.php:177
[0x00007fe08a61def8] block_fetch_content() /tests/avots/funkcija/function_block.php:120
[0x00007fe08a61de18] block_display_batch() /tests/avots/funkcija/function_core.php:804
[0x00007fe08a61dbd0] block_display() /tests/dati/veidne/3_diy_forum_discuz.tpl.php:29
[0x00007fe08a61d828] +++ izmete neizdevās


Jūs zināt, kāds ir šīs kļūdas cēlonis, un lēnā vaicājuma izpilde ierakstīs šo kļūdu ilgāk par 5 sekundēm, servera nginx un php-fpm





Iepriekšējo:Iemāca ātri izprast Discuz! failu funkciju, un turpmāk jums nav jālūdz palīdzība, lai modificētu failus
Nākamo:[Obligāti jābūt vilciena biļešu iegādei] 12306 Apvedceļa novirzīšanas biļešu sagrābšana v1.5 zaļā versija
Publicēts 01.12.2014 12:20:49 |
[0x00007fe08a61eba8] curl_exec() /tests/avots/funkcija/function_filesock.php:68 68. rindā ir kļūda, kas var palīdzēt tikai :L
 Saimnieks| Publicēts 01.12.2014 13:45:36 |
Delver_Si Publicēts 2014-12-1 12:20
[0x00007fe08a61eba8] curl_exec() /test/source/function/function_filesock.php:68 68. rindā ir kļūda, tikai ...

Jūsu māsa, es arī zinu, ka šī līnija ir nepareiza, bet es nezinu, kam šis dokuments ir paredzēts
Publicēts 01.12.2014 21:01:08 |
/test/source/function/function_filesock.php  源代码给我
 Saimnieks| Publicēts 01.12.2014 21:14:41 |
Delver_Si Publicēts 2014-12-1 21:01
/test/source/function/function_filesock.php  源代码给我

[mw_shl_code=php,true]<?php

/**
* [Diskut!] (C)2001-2099 Comsenz Inc.
* Šī NAV bezmaksas programmatūra, lietošana ir pakļauta licences noteikumiem
*
* $Id: function_filesock.php 34441 2014-04-29 07:47:26Z nemohou $
*/

if(!defined('IN_DISCUZ')) {
        exit('Piekļuve liegta');
}

funkcija _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE, $encodetype = 'URLENCODE', $allowcurl = TRUE, $position = 0, $files = masīvs( )) {
        $return = '';
        $matches = parse_url($url);
        $scheme = $matches['shēma'];
        $host = $matches['saimnieks'];
        $path = $matches['ceļš'] ? $matches['ceļš']. ($matches['vaicājums'] ? '?'. $matches['vaicājums'] : '') : '/';
        $port = !empty($matches['port']) ? $matches['port'] : ($scheme == 'http' ? '80' : '');
        $boundary = $encodetype == 'URLENCODE'? '' : nejaušs [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 = masīvs();
                if($ip) {
                        $httpheader[] = "Resursdators: ".$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, nepatiess);
                curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, nepatiess);
                curl_setopt ($ch, CURLOPT_RETURNTRANSFER, taisnība);
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, taisnība);
                curl_setopt($ch, CURLOPT_HEADER, 1);
                if($post) {
                        curl_setopt ($ch, CURLOPT_POST, 1);
                        if($encodetype == 'URLENCODE') {
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
                        } citādi {
                                foreach($post kā $k => $v) {
                                        IF(ISSET($files[$k])) {
                                                $post[$k] = '@'.$files[$k];
                                        }
                                }
                                foreach($files kā $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. punkts;
                if($errno || $status['http_code'] != 200) {
                        atgriešanās;
                } citādi {
                        $GLOBALS['filesockheader'] = substr($data, 0, $status['header_size']);
                        $data = substr($data, $status['header_size']);
                        atgriezties !$limit ? $data : apakšstr($data, 0, $limit);
                }
        }

        if($post) {
                if($encodetype == 'URLENCODE') {
                        $data = http_build_query($post);
                } citādi {
                        $data = '';
                        foreach($post kā $k => $v) {
                                $data .= "--$boundary\r\n";
                                $data .= 'Satura izvietojums: formas dati; name="'.$k.'"". (isset($files[$k]) ? '; faila nosaukums="'.basename($files[$k]).'"; Satura tips: application/octet-stream' : '')." \r\n\r\n";
                                $data .= $v." \r\n";
                        }
                        foreach($files kā $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 .= 'Satura izvietojums: formas dati; name="'.$k.'"; faila nosaukums="'.basename($file).'"; Satura tips: application/octet-stream'." \r\n\r\n";
                                                $data .= $v." \r\n";
                                        }
                                }
                        }
                        $data .= "--$boundary\r\n";
                }
                $out = "POST $path HTTP/1.0\r\n";
                $header = "Akceptēt: */*\r\n";
                $header .= "Akceptēt valodu: zh-cn\r\n";
                $header .= $encodetype == 'URLENCODE' ? "Content-Type: application/x-www-form-urlencoded\r\n" : "Content-Type: multipart/form-data; robeža=$boundary\r\n";
                $header .= 'Satura garums: '.strlen($data)." \r\n";
                $header .= "Lietotāja aģents: $_SERVER[HTTP_USER_AGENT]\r\n";
                $header .= "Resursdators: $host:$port\r\n";
                $header .= "Savienojums: Tuvu\r\n";
                $header .= "Kešatmiņas kontrole: bez kešatmiņas\r\n";
                $header .= "Sīkfails: $cookie\r\n\r\n";
                $out .= $header;
                $out .= $data;
        } citādi {
                $out = "IEGŪT $path HTTP/1.0\r\n";
                $header = "Akceptēt: */*\r\n";
                $header .= "Akceptēt valodu: zh-cn\r\n";
                $header .= "Lietotāja aģents: $_SERVER[HTTP_USER_AGENT]\r\n";
                $header .= "Resursdators: $host:$port\r\n";
                $header .= "Savienojums: Tuvu\r\n";
                $header .= "Sīkfails: $cookie\r\n\r\n";
                $out .= $header;
        }

        $fpflag = 0;
        if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
                $context = masīvs(
                        'http' => masīvs(
                                'metode' => $post ? "POST" : "IEGŪT",
                                'galvenais' => $header,
                                'saturs' => $post,
                                'taimauts' => $timeout,
                        ),
                );
                $context = stream_context_create($context);
                $fp = @fopen($scheme.'://'.( $ip ? $ip : $host).':'.$port.$path, 'b', false, $context);
                $fpflag = 1;
        }

        if(!$fp) {
                atgriezt '';
        } citādi {
                stream_set_blocking($fp, $block);
                stream_set_timeout($fp, $timeout);
                @fwrite($fp, $out);
                $status = stream_get_meta_data($fp);
                if(!$status['timed_out']) {
                        kamēr (!feof($fp) && !$fpflag) {
                                $header = @fgets($fp);
                                $headers .= $header;
                                if($header && ($header == "\r\n" ||  $header == "\n")) {
                                        pārtraukums;
                                }
                        }
                        $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);
                        } citādi {
                                $return = stream_get_contents($fp);
                        }
                }
                @fclose $fp. punkts;
                atgriešanās $return;
        }
}

funkcija _format_postkey($post, &$result, $key = '') {
        foreach($post kā $k => $v) {
                $_k = $key ? $key." ['.$k.']' : $k;
                if(is_array($v)) {
                        _format_postkey ($v, $result, _k USD);
                } citādi {
                        $result[$_k] = $v;
                }
        }
}

?>[/mw_shl_code]
Publicēts 02.12.2014 00:08:32 |
Es nevaru saprast
Atruna:
Visa programmatūra, programmēšanas materiāli vai raksti, ko publicē Code Farmer Network, ir paredzēti tikai mācību un pētniecības mērķiem; Iepriekš minēto saturu nedrīkst izmantot komerciāliem vai nelikumīgiem mērķiem, pretējā gadījumā lietotājiem ir jāuzņemas visas sekas. Informācija šajā vietnē nāk no interneta, un autortiesību strīdiem nav nekāda sakara ar šo vietni. Iepriekš minētais saturs ir pilnībā jāizdzēš no datora 24 stundu laikā pēc lejupielādes. Ja jums patīk programma, lūdzu, atbalstiet oriģinālu programmatūru, iegādājieties reģistrāciju un iegūstiet labākus oriģinālus pakalpojumus. Ja ir kādi pārkāpumi, lūdzu, sazinieties ar mums pa e-pastu.

Mail To:help@itsvse.com