Help Fatal Error: Out of memory (bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365 tuyhoaplus)

Discussion in 'Addon, Styling and Customization Questions' started by Jindo_Katori, Aug 11, 2017.

  1. Jindo_Katori

    Jindo_Katori Thượng Đế

    Joined:
    Mar 1, 2015
    Messages:
    1,463
    Likes Received:
    1,114
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    http://tuyhoaplus.com
    Location:
    http://tuyhoaplus.com
    Home Page:
    Site của mình là: http://tuyhoaplus.com
    LIST lỗi mà tới hơn 40000 lỗi.
    Nhìn thấy nản luôn
    Có tra google về
    Fatal Error: Out of memory
    Mà không có hướng dẫn nào cụ thể cả
    Không biết có cách nào khắc phục không hay phải thuê server khác hở các bác ;( ?

    upload_2017-8-11_11-54-24.png

    Code:
    _templateName = $templateName;
            $this->preloadTemplate($templateName);
    
            if ($params)
            {
                $this->setParams($params);
            }
        }
    
        /**
         * Creates a new template object of the current type. Mainly helpful
         * if an event only has the current template object in scope.
         *
         * @param string $templateName
         * @param array $params
         *
         * @return XenForo_Template_Abstract
         */
        public function create($templateName, array $params = array())
        {
            $class = get_class($this);
            return new $class($templateName, $params);
        }
    
        /**
         * Sets the language ID that templates will be retrieved from.
         *
         * @param integer $languageId
         */
        public static function setLanguageId($languageId)
        {
            self::$_languageId = intval($languageId);
        }
    
        /**
        * Add an array of params to the template. Overwrites parameters with the same name.
        *
        * @param array
        */
        public function setParams(array $params)
        {
            $this->_params = ($this->_params ? XenForo_Application::mapMerge($this->_params, $params) : $params);
        }
    
        /**
        * Add a single param to the template. Overwrites parameters with the same name.
        *
        * @param string
        */
        public function setParam($key, $value)
        {
            $this->_params[$key] = $value;
        }
    
        /**
         * Get all template parameters.
         *
         * @return array
         */
        public function getParams()
        {
            return $this->_params;
        }
    
        /**
         * Get a single template parameter.
         *
         * @param string
         *
         * @return mixed Null if not found.
         */
        public function getParam($key)
        {
            if (array_key_exists($key, $this->_params))
            {
                return $this->_params[$key];
            }
    
            return null;
        }
    
        /**
         * @return string
         */
        public function getTemplateName()
        {
            return $this->_templateName;
        }
    
        /**
        * Renders the specified template and returns the output.
        *
        * @return string
        */
        public function render()
        {
            $__template = $this->_loadTemplate($this->_templateName);
            if ($__template === '')
            {
                return '';
            }
    
            XenForo_Phrase::loadPhrases();
    
            set_error_handler(array($this, 'handleTemplateError'));
            $this->_templateErrors = array();
    
            $__output = $this->_renderInternal($__template, $__extraData);
    
            restore_error_handler();
    
            XenForo_CodeEvent::fire('template_post_render', array($this->_templateName, &$__output, &$__extraData, $this), $this->_templateName);
    
            if (is_array($__extraData) && !empty($__extraData))
            {
                $this->_mergeExtraContainerData($__extraData);
            }
    
            if ($this->_templateErrors && XenForo_Application::debugMode())
            {
                if ($this->_usingTemplateFiles())
                {
                    $templateCode = file_get_contents($__template);
                }
                else
                {
                    $templateCode = $__template;
                }
    
                $lines = preg_split('/\r?\n/', $__template);
    
                echo "

    Template Errors: " . htmlspecialchars($this->_templateName) . "

      \n"; foreach ($this->_templateErrors AS $error) { $contextLine = ($error['line'] > 1 ? $error['line'] - 2 : 0); $context = array_slice($lines, $contextLine, 3, true); echo "\t
    1. " . htmlspecialchars($error['error']) . " in " . htmlspecialchars($error['file']) . ", line $error[line]"; if ($context) { echo ":
      ";
                          foreach ($context AS $lineNum => $contextLine)
                          {
                              echo ($lineNum + 1) . ": " . htmlspecialchars($contextLine) . "\n";
                          }
                          echo "
      "; } echo "
    2. \n"; } echo "
    \n\n"; } return $__output === null ? '' : $__output; } /** * Internal template rendering. * * @param string $__template Template text or name of template file * @param array $__extraData Returned extra data from the render * * @return string Rendered template */ protected function _renderInternal($__template, &$__extraData) { $__params = $this->_params; // special variable for dumping purposes extract($this->_params); $__output = ''; $__extraData = array(); if ($this->_usingTemplateFiles()) { if (file_exists($__template)) { include($__template); } } else { eval($__template); } return $__output; } /** * Calls the specified template hook event. * * Params passed by template explicitly will respect mappings and greater context. * Raw params are still available via the template object. * * @param string $name Name of the hook * @param string $contents Contents of the hook; may be empty * @param array $params List of params to pass specifically; these will respect mappings. * * @return string New version of the contents (could be modified) */ public function callTemplateHook($name, $contents, array $params) { XenForo_CodeEvent::fire('template_hook', array($name, &$contents, $params, $this), $name); return $contents; } /** * Calls the specified template callback. * * @param string|object $class * @param string $method * @param string $contents Contents (children) of the callback; may be empty * @param array $params List of params to pass specifically; these will respect mappings. * * @return string New version of the contents (could be modified) */ public function callTemplateCallback($class, $method, $contents, $params) { $call = true; if (!is_object($class)) { $className = $class = strval($class); if (!class_exists($class)) { $call = 'Class missing'; } } else { $className = get_class($class); } $method = trim(strval($method)); if (!is_callable(array($class, $method))) { $call = 'Not callable'; } else if (!preg_match('/^(get|is|has|render|view|return|print|show|display)/i', $method)) { $call = 'Method does not match prefix: get, is, has, render, view, return, print, show, display'; } if ($call === true) { ob_start(); $contents = call_user_func(array($class, $method), $contents, $params, $this); $contents .= ob_get_contents(); ob_end_clean(); } else { $contents .= "\nCould not execute callback $className::$method() - $call.\n"; } return $contents; } /** * Error handler that traps errors in templates. * * @param integer $errorType Type of error (one of the E_* constants) * @param string $errorString * @param string $file * @param integer $line */ public function handleTemplateError($errorType, $errorString, $file, $line) { if ($errorType == E_NOTICE) { return; } if ($errorType & error_reporting()) { $this->_templateErrors[] = array( 'type' => $errorType, 'error' => $errorString, 'file' => $file, 'line' => $line ); } } /** * Gets required external resources as HTML for use in a template directly. * * @param string Type of requirement to fetch * * @return string Requirements as HTML */ public function getRequiredExternalsAsHtml($type) { $required = $this->_getRequiredExternals(); if (empty($required[$type])) { return ''; } $typeRequired = array_unique($required[$type]); switch ($type) { case 'js': return $this->getRequiredJavaScriptAsHtml($typeRequired); case 'css': return $this->getRequiredCssAsHtml($this->getRequiredCssUrl($typeRequired)); default: return false; } } public function getRequiredExternalsAsJson() { $required = $this->_getRequiredExternals(); $output = array(); foreach ($required AS $type => $externals) { if ($type == 'js') { $externals = $this->_processJsUrls($externals); } foreach ($externals AS $external) { $output[$external] = true; } } return json_encode($output); } /** * Gets required externals in a structured way. Values will be returned as a list of URLs. * * @param string $type * * @return array List of URLs */ public function getRequiredExternals($type) { $required = $this->_getRequiredExternals(); if (empty($required[$type])) { return ''; } $typeRequired = array_reverse(array_unique($required[$type])); switch ($type) { case 'js': return $this->_processJsUrls($typeRequired); case 'css': return array( 'stylesheets' => $typeRequired, 'urlTemplate' => $this->getRequiredCssUrl(array('__sentinel__')) ); default: return false; } } /** * Gets the list of required JavaScript files as HTML script tags. * * @param array $requirements Array of paths to JS files. * * @return string */ public function getRequiredJavaScriptAsHtml(array $requirements) { $output = ''; foreach ($this->_processJsUrls($requirements) AS $requirement) { $output .= "\t" . '' . "\n"; } return $output; } protected function _processJsUrls(array $jsFiles) { // add version number to each required file foreach ($jsFiles AS &$file) { if (!strpos($file, '_v=')) { $file = $file . (strpos($file, '?') ? '&' : '?') . '_v=' . XenForo_Application::$jsVersion; } } // source XenForo JS from 'js/bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365/x/' if required switch (XenForo_Application::get('options')->uncompressedJs) { case 1: $jsFiles = str_replace('js/bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365/', 'js/bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365/full/', $jsFiles); break; case 2: $jsFiles = str_replace('js/bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365/', 'js/bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365/min/', $jsFiles); break; } // handle custom JS URL return preg_replace('#^js/#', XenForo_Application::$javaScriptUrl . '/', $jsFiles); } /** * Gets the required CSS as an HTML tag. Expected arg is simple a URL. * * @param string $requirement * * @return string */ public function getRequiredCssAsHtml($requirement) { return '\n"; } /** * Gets the URL to fetch the list of required CSS templates. Requirements * should be a list of CSS templates, not including the trailing ".css". * * @param array $requirements * * @return string */ abstract public function getRequiredCssUrl(array $requirements); /** * Implicit string cast renders the template. * * @return string */ public function __toString() { try { return $this->render(); } catch (Exception $e) { XenForo_Error::logException($e, false, "Template to string error:"); XenForo_Error::unexpectedException($e); } } /** * Load the named template. * * @param string Template name * * @return string Compiled version of the template */ protected function _loadTemplate($templateName) { if ($template = $this->_loadTemplateFilePath($templateName)) { return $template; } else if ($template = $this->_loadTemplateFromCache($templateName)) { return $template; } else { $this->_loadTemplates(); return $this->_loadTemplateFromCache($templateName); } } /** * Bulk load all templates that are required. */ protected function _loadTemplates() { $toLoad = $this->getToLoadList(); if (!$toLoad) { return; } $templates = $this->_getTemplatesFromDataSource(array_keys($toLoad)); if ($templates) { $this->_mergeIntoTemplateCache($templates); } $this->_resetToLoadList(); } /** * Adds required external for this type of template to be output later. * * @param string Type of requirement * @param string Value for requirement */ public function addRequiredExternal($type, $requirement) { $existing = $this->_getRequiredExternals(); $existing[$type][] = $requirement; $this->_setRequiredExternals($existing); } /** * Goes to the data source to load the list of templates. * * @param array Template list * * @return array Key-value pairs of template titles/compiled templates */ abstract protected function _getTemplatesFromDataSource(array $templateList); /** * Helper function get the list of templates that are waiting to be loaded. * * @return array */ abstract public function getToLoadList(); /** * Resets the to load list to empty. */ abstract protected function _resetToLoadList(); /** * Merges key-value pairs of template names/compiled templates into the local template * cache. * * @param array Templates (key: name, value: compiled output) */ abstract protected function _mergeIntoTemplateCache(array $templates); /** * Non-static method for pre-loading a template. * * @param string Template name */ abstract protected function _preloadTemplate($templateName); /** * Loads a template out of the local template cache. If the template does not * exist, it will be set to an empty string. This will be overwritten if * the template is loaded from the data source. * * @param string Template name * * @return string Compiled template */ abstract protected function _loadTemplateFromCache($templateName); /** * Loads the file path where a template is located in the file system, if * templates are being stored in the file system. * * @param string Template name * * @param string Empty string (not using file system) or file path */ abstract protected function _loadTemplateFilePath($templateName); /** * Gets the list of required external resources. * * @return array */ abstract protected function _getRequiredExternals(); /** * Sets the list of required external resources. * * @param array */ abstract protected function _setRequiredExternals(array $required); /** * Merges in extra container data from the template render. * * @param array */ abstract protected function _mergeExtraContainerData(array $extraData); /** * Determines whether we are using templates in the file system. * * @return boolean */ abstract protected function _usingTemplateFiles(); /** * Specify a template that needs to be preloaded for use later. This is useful * if you think a render is going to be called before the template you require * is to be used. * * @param string Template to preload */ public static function preloadTemplate($templateName) { throw new XenForo_Exception('This function must be overridden in a child class.'); } /** * Manually sets a template. This is primarily useful for testing. * * @param string Name of the template * @param string Value for the template */ public static function setTemplate($templateName, $templateValue) { throw new XenForo_Exception('This function must be overridden in a child class.'); } /** * Resets the template system state. */ public static function reset() { throw new XenForo_Exception('This function must be overridden in a child class.'); } }
     
    Last edited: Aug 11, 2017
  2. dinhphucv

    dinhphucv Thượng Đế

    Joined:
    Aug 9, 2017
    Messages:
    427
    Likes Received:
    211
    Trophy Points:
    43
    Gender:
    Male
    Location:
    Quảng Ngãi
    Tăng PHP limit lên, cũng có thể là do một add-ons nào đó.
     
    Jindo_Katori likes this.
  3. aviaiva

    aviaiva Thượng Đế

    Joined:
    Mar 1, 2016
    Messages:
    339
    Likes Received:
    265
    Trophy Points:
    63
    Location:
    hn
    Home Page:
    Do nhiều người truy cập, host yếu quá nên bị tràn bộ nhớ đệm, xác định là nâng cấp host thôi.
     
    Jindo_Katori likes this.
  4. Jindo_Katori

    Jindo_Katori Thượng Đế

    Joined:
    Mar 1, 2015
    Messages:
    1,463
    Likes Received:
    1,114
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    http://tuyhoaplus.com
    Location:
    http://tuyhoaplus.com
    Home Page:
    Trước hết cám ơn bác đã giúp đỡ
    Mình có tra google về việc tăng "PHP litmit" thì tìm được 02 cách xử lý sau: Nhưng hình như là nó liên quan đến vấn đề up/post file lên 4rum/host - nhưng tuyhoaplus.com của mình hoàn toàn không cho up file (kể cả hình) để tránh virus và một phần dung lượng của mình không được dư dã mấy (còn khoảng 50%) ? Trong khi mình nhận thấy lỗi này xảy ra khi mình thực hiện một tác vụ nào đó trên web ví dụ click xem bài, click tiếp theo sẽ bị lỗi, click tiếp theo lại bình thường (tỷ lệ hiện tại là 50-50 : quá nặng) - trường hợp này khá giống với những gì bác bên dưới nói?
    Mình đã thử tắt toàn bộ addon nhưng không thấy có hiệu quả?

    Còn trường hợp nhiều người quá tràn bộ nhớ thì về lý thuyết mình cảm thấy khá là hợp lý (nên mình có nghĩ đến giải pháp nâng cấp host) nhưng về thực tế thì không trùng khớp vì mình kiểm tra số lượng user (kể cả khách trực tuyến) chỉ trên dưới 10 người ;( (và chỉ xem chứ không có tác vụ như post, comment hay like,...).
     
  5. aviaiva

    aviaiva Thượng Đế

    Joined:
    Mar 1, 2016
    Messages:
    339
    Likes Received:
    265
    Trophy Points:
    63
    Location:
    hn
    Home Page:
    khi bạn đã sập một lần => thằng code host nó sẽ auto giảm thông số xuống (host rẻ toàn bị thế) nói chung là tiền nào của ấy thôi. Ngoài việc nâng cấp phần cứng thì vô phương, sớm hay muộn nó lại bị, không khắc phục sớm rank google tụt thê thảm
     
  6. Jindo_Katori

    Jindo_Katori Thượng Đế

    Joined:
    Mar 1, 2015
    Messages:
    1,463
    Likes Received:
    1,114
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    http://tuyhoaplus.com
    Location:
    http://tuyhoaplus.com
    Home Page:
    Đúng là đang tụt đến nỗi không thể cứu vãn (lượt lỗi fatal... xuất hiện theo từng giây) ;(
    Cơ mà mình đang dùng MẮT BÃO 2 năm rồi thằng này mình thấy khá uy tín giá cũng mắc (cơ bản mỗi lần bị dos thì nó lại đổi ip giúp mình)
    Đợt vừa rồi hết hạn mình quyết định gia hạn thêm thì thằng sale thay vì gia hạn nó tạo một cái host mới và move data của mình qua ip mới: bắt đầu sau sự việc đó thì lỗi này mới bắt đầu xuất hiện (mình có hỏi kỹ thuật thì lý do thằng sale nó muốn kiếm doanh số tạo host mới : thật là value - mình có gọi điện chửi 1 trân call~~ ). Bây giờ không dưng bị án mất tiền oan.
    Chưa kể mình còn đang đổ 1 đống tiền chạy ads => kéo view về web nữa chứ (mà khi về mà web lại bị lỗi lại càng mất khách - điên không thể tả được doh~~ ).
     
  7. dinhphucv

    dinhphucv Thượng Đế

    Joined:
    Aug 9, 2017
    Messages:
    427
    Likes Received:
    211
    Trophy Points:
    43
    Gender:
    Male
    Location:
    Quảng Ngãi
    Bác xài vultr ấy 5$ 1 tháng vps 1GB, data center singapore nữa thì khỏi chê. Bác config vps cho phù hợp bet365 có những phương thức nạp tiền nào_link vào bet365_điểm số trực tiếp bet365 nữa là ngon. Host thường cài hết tất cả những extension để tương thích với nhiều code nên tốn tài nguyên.
     
  8. aviaiva

    aviaiva Thượng Đế

    Joined:
    Mar 1, 2016
    Messages:
    339
    Likes Received:
    265
    Trophy Points:
    63
    Location:
    hn
    Home Page:
    vps nước ngoài, bác cài xen null có ngày dễ tèo giggle~~
     
    Jindo_Katori likes this.
  9. Blue

    Blue Admin - Founder Staff Member

    Joined:
    Feb 25, 2015
    Messages:
    796
    Likes Received:
    1,246
    Trophy Points:
    93
    Gender:
    Male
    Lỗi này nên xem lại cẩn thận, bạn phải nhớ thời điểm nó bắt đầu lỗi là khi nào, lúc đó có đang cài addon hay code gì không. Nếu bị quá tải thì nó sẽ không bị liên tục.
    Mình thấy khả năng lỗi ở code hoặc database cao hơn.
     
    Jindo_Katori likes this.
  10. Jindo_Katori

    Jindo_Katori Thượng Đế

    Joined:
    Mar 1, 2015
    Messages:
    1,463
    Likes Received:
    1,114
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    http://tuyhoaplus.com
    Location:
    http://tuyhoaplus.com
    Home Page:
    Site của mình chỉ dành cho 1 ít mem địa phương (tại Phú Yên chứ không hướng ra cả nước) nên mình ưu tiên server trong nước cho nó khỏi bị cá mập cắn cáp bác ạ.
    Dạ. Chính xác là sau khi backup và di chuyển dữ liệu qua host mới.
    Đúng là bị liên tục đó bác.
    Không biết bác có thể check dùm e đc ko ạ. Trà nước thế nào mình xin hậu tạ ạ
     

Share This Page