What are core files

What are core files

Postby supermanz » Sun Aug 14, 2011 9:54 am

I connect with ftp to my site.
I saw to root some core extensin files that are many MBytes. What are those ? Problems ?

here is the screenshot
Image
Random avatar
supermanz
 
Posts: 5
Joined: Sun Aug 14, 2011 8:27 am

Re: What are core files

Postby kashwak » Sun Aug 14, 2011 10:58 am

have never seen this before. what version are you running? what does your .htacess have in it? are you getting any error in your error file?
Join us on Twitter Image
User avatar
kashwak
Site Admin
 
Posts: 138
Joined: Fri May 27, 2011 7:03 pm

Re: What are core files

Postby supermanz » Sun Aug 14, 2011 12:08 pm

I check php error logs from acp and i got

Code: Select all
====================================================================
Time Encountered: August 14, 2011, 11:42:50 AM
Error Type: Unknown Error (Error #4)
Error String: syntax error, unexpected ','
Error File: /home/redbull/public_html/source/includes/template.php(99) : eval()'d code
Error Line: 82
====================================================================
====================================================================
Time Encountered: August 14, 2011, 11:43:19 AM
Error Type: Unknown Error (Error #4)
Error String: syntax error, unexpected ','
Error File: /home/redbull/public_html/source/includes/template.php(99) : eval()'d code
Error Line: 82
====================================================================
====================================================================
Time Encountered: August 14, 2011, 11:43:33 AM
Error Type: Unknown Error (Error #4)
Error String: syntax error, unexpected ','
Error File: /home/redbull/public_html/source/includes/template.php(99) : eval()'d code
Error Line: 82
====================================================================


I use Mihalism Multi Host v5.0.2

To my .htaccess i have
Code: Select all
<IfModule mod_suphp.c>
 suPHP_ConfigPath /home/redbull
 <Files php.ini>
   order allow,deny
   deny from all
 </Files>
</IfModule>
Random avatar
supermanz
 
Posts: 5
Joined: Sun Aug 14, 2011 8:27 am

Re: What are core files

Postby kashwak » Sun Aug 14, 2011 4:04 pm

ok post your template.php file here so that i can take a look at it.
Join us on Twitter Image
User avatar
kashwak
Site Admin
 
Posts: 138
Joined: Fri May 27, 2011 7:03 pm

Re: What are core files

Postby Josh D. » Sun Aug 14, 2011 11:34 pm

They are linux core dump files, this is from another forum:
They are core dump files. You usually get these whenever a program crashes due to a segmentation fault. Although there are other reasons for them.

You should be able to open them up with any text editor, however, the information inside the files probably won't mean much to you. Generally you just delete them. Check the permissions on the files cause you may need to delete them as root.

A quick way to delete all the files is by issueing the following command

# rm -rf core.*


Though I don't know what would be causing them to show up on your server I hope it helps in some way.
Josh D. [Owner] - Mihalism Technologies
Notice, my support will now be limited to those who do not have a ton of ads loaded on their site.
I may not always have a response to a question on the forum but I do the best I can when I can.

Image
Our Facebook Page
User avatar
Josh D.
Coder / Modder
 
Posts: 177
Joined: Tue Jun 14, 2011 2:48 am
Location: USA

Re: What are core files

Postby supermanz » Mon Aug 15, 2011 4:20 am

Hello and thanks for the support Josh and kashwak. I chat with my vps host provider and told me that the script trying to use something lile "us" (can`t remember exactly) byt the server use "phpu". I said them that before that i was to a shared server didn`t have those. They said me that those core files alwayas were there but now i can see them because i have vps. Also as i read are generated from unexpexted termination of a program.


Here is the template.php
Code: Select all
<?php
   // ======================================== \
   // Package: Mihalism Multi Host
   // Version: 5.0.0
   // Copyright (c) 2007, 2008, 2009 Mihalism Technologies
   // License: http://www.gnu.org/licenses/gpl.txt GNU Public License
   // LTE: 1251319798 - Wednesday, August 26, 2009, 04:49:58 PM EDT -0400
   // ======================================== /
   
   class mmhclass_template_engine
   {
      // Class Initialization Method
      function __construct() {
         global $mmhclass; $this->mmhclass = &$mmhclass;
         $this->templ_vars = $this->templ_globals = array();
         
         $this->cif_check = array(
            "thefile" => "4619e2d1cf360c591e18ddb436842c77",
            "thefoot" => "PCEtLSBQb3dlcmVkIGJ5IE1paGFsaXNtIE11bHRpIEhvc3QgLSBDb3B5cmlnaHQgKGMpIDIwMDcsIDIwMDgsIDIwMDkgTWloYWxpc20gVGVjaG5vbG9naWVzICh3d3cubWloYWxpc20ubmV0KSAtLT4=",
            "thematch" => "&#104;&#116;&#116;&#112;&#58;&#47;&#47;&#119;&#119;&#119;&#46;&#109;&#105;&#104;&#97;&#108;&#105;&#115;&#109;&#46;&#110;&#101;&#116;&#47;&#109;&#117;&#108;&#116;&#105;&#104;&#111;&#115;&#116;&#47;",
            "theurl" => "&#104;&#116;&#116;&#112;&#58;&#47;&#47;&#99;&#97;&#108;&#108;&#104;&#111;&#109;&#101;&#46;&#109;&#105;&#104;&#97;&#108;&#105;&#115;&#109;&#46;&#110;&#101;&#116;&#47;&#109;&#117;&#108;&#116;&#105;&#104;&#111;&#115;&#116;&#47;&#63;&#105;&#100;&#61;&#37;&#115;&#38;&#108;&#99;&#61;&#49;",
            "therror" => "&#78;&#111;&#32;&#108;&#105;&#110;&#107;&#98;&#97;&#99;&#107;&#32;&#102;&#111;&#117;&#110;&#100;&#32;&#105;&#110;&#32;&#102;&#111;&#111;&#116;&#101;&#114;&#46;&#60;&#98;&#114;&#32;&#47;&#62;&#85;&#115;&#105;&#110;&#103;&#32;&#73;&#76;&#76;&#69;&#71;&#65;&#76;&#32;&#99;&#111;&#112;&#105;&#101;&#115;&#32;&#105;&#115;&#32;&#66;&#65;&#68;&#46;",
         );
      }
   
      function output($filename = NULL, $template = NULL)
      {
         $template_html = sprintf("%s%s%s%s", $this->page_header(), ((isset($this->html) == true) ? $this->html : $this->parse_template($filename, $template)), $this->page_footer(), sprintf("\n%s", base64_decode($this->cif_check['thefoot'])));
      
         $this->mmhclass->db->close();
         
         exit($this->tidy_html($template_html));
      }
      
      function parse_template($filename, $template = NULL)
      {
         if ($this->mmhclass->funcs->is_file("{$this->mmhclass->info->root_path}source/public_html/{$filename}.tpl") == false) {
            $this->fatal_error("The template file 'source/public_html/{$filename}.tpl' does not exist.");
         } else {
            $html2parse = implode("", file("{$this->mmhclass->info->root_path}source/public_html/{$filename}.tpl"));
            
            if ($this->mmhclass->funcs->is_null($template) == false) {
               if (preg_match("#<template id=\"{$template}\">(.*)</template>#Usi", $html2parse, $template_matches) == true) {
                  $html2parse = $template_matches['1'];
               } else {
                  $this->fatal_error("Template ID '{$template}' does not exist in the template file 'source/public_html/{$filename}.tpl'.");   
               }
            }
            
            if (is_array($this->templ_vars) == true && $this->mmhclass->funcs->is_null($this->templ_vars) == false) {
               foreach ($this->templ_vars as $index => $variable_block) {
                  foreach ($variable_block as $variable => $replacement) {
                     if (stripos($html2parse, "<# {$variable} #>") !== false) {
                        $html2parse = str_replace("<# {$variable} #>", $replacement, $html2parse);
                        unset($this->templ_vars[$index][$variable]);
                     }
                  }
               }
            }
            
            $html2parse = preg_replace(array('#<([\?%])=?.*?\1>#s', '#<script\s+language\s*=\s*(["\']?)php\1\s*>.*?</script\s*>#s', '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s', "#<!-- (BEGIN|END): (.*) -->#", "#<\\$(.*?)\\$>#Us"), NULL, $html2parse);
            $html2parse = ((md5($filename) == $this->cif_check['thefile']) ? $this->bug_fix_56941($html2parse) : $html2parse);
            
            if (strpos($html2parse, "<foreach=") == true) {
               $parse_html2php = true;
               
               $html2parse = preg_replace("#</endforeach>#", '<?php } ?>', $html2parse);
               $html2parse = preg_replace("#<foraech=\"([^\n]+)\">#", '<?php foreach ($1) { ?>', $html2parse);
            }
            
            if (strpos($html2parse, "<if=") ==  true) {
               $parse_html2php = true;
               
               $html2parse = preg_replace("#</endif>#", '<?php } ?>', $html2parse);
               $html2parse = preg_replace("#<else>#", '<?php } else { ?>', $html2parse);
               $html2parse = preg_replace("#<if=\"([^\n]+)\">#", '<?php if ($1) { ?>', $html2parse);
               $html2parse = preg_replace("#<elseif=\"([^\n]+)\">#", '<?php } elseif ($1) { ?>', $html2parse);
            }
            
            if (strpos($html2parse, "<php>") == true) {
               $parse_html2php = true;
               
               $html2parse = preg_replace("#</php>#", '?>', $html2parse);
               $html2parse = preg_replace("#<php>#", '<?php', $html2parse);
            }
            
            if (strpos($html2parse, "<while id=") == true) {
               preg_match_all("#<while id=\"([^\s]+)\">(.*)</endwhile>#Us", $html2parse, $whileloop_matches);
               
               foreach ($whileloop_matches['1'] as $id => $ident) {
                  $doreplace = ((count($whileloop_matches['1']) > 1) ? $this->templ_globals['get_whileloop'][$ident] : $this->templ_globals['get_whileloop']);
                  $html2parse = (($doreplace == false) ? preg_replace("#<while id=\"{$ident}\">(.*)</endwhile>#Us", $this->templ_globals[$ident], $html2parse) : $whileloop_matches['2'][$id]);
               }
            }   
            
            if ($parse_html2php == true) {
               $mmhclass = $this->mmhclass;
               
               ob_start(); eval("?>{$html2parse}");
               
               $html2parse = ob_get_clean();
            }   
            
            return $html2parse;
         }
      }
      
      function tidy_html($html)
      {
         if (ENABLE_TEMPLATE_TIDY_HTML == true) {
            $tidy_config = array(
               'wrap' => 0,
               "tab-size" => 4,
               "clean" => true,
               "tidy-mark" => true,
               "indent-cdata" => true,
               "force-output" => true,
               "output-xhtml" => true,
               "merge-divs" => false,
               "merge-spans" => false,
               "sort-attributes" => true,
            );
            
            $html = tidy_parse_string($html, $tidy_config, "UTF8");
            
            $html->cleanRepair();
         }
         
         return trim($html);
      }

      function page_header()
      {
         if ($this->mmhclass->funcs->is_null($this->page_header) == true) {
            $this->templ_vars[] = array(
               "VERSION" => $this->mmhclass->info->version,
               "BASE_URL" => $this->mmhclass->info->base_url,
               "SITE_NAME" => $this->mmhclass->info->config['site_name'],
               "USERNAME" => $this->mmhclass->info->user_data['username'],
               "RETURN_URL" => base64_encode($this->mmhclass->info->page_url),
               "PAGE_TITLE" => (($this->mmhclass->funcs->is_null($this->page_title) == false) ? $this->page_title : $this->mmhclass->info->config['site_name']),
            );
            
            return $this->parse_template("page_header");
         } else {
            return $this->page_header;
         }
      }

      function page_footer()
      {
         if ($this->mmhclass->funcs->is_null($this->page_footer) == true) {
            $this->templ_vars[] = array(
               "GOOGLE_ANALYTICS_ID" => $this->mmhclass->info->config['google_analytics'],
               "PAGE_LOAD" => substr(($this->mmhclass->funcs->microtime_float() - $this->mmhclass->info->init_time), 0, 5),   
               "TOTAL_PAGE_VIEWS" => (($this->mmhclass->funcs->is_null($this->mmhclass->info->site_cache['page_views']) == true) ? $this->mmhclass->lang['6697'] : $this->mmhclass->funcs->format_number($this->mmhclass->info->site_cache['page_views'])),
            );
            
            return $this->parse_template("page_footer");
         } else {
            return $this->page_footer;
         }
      }

      function lightbox_error($error, $output_html = false)
      {
         $this->templ_vars[] = array("ERROR" => $error);
         
         $function = (($output_html == true) ? "output" : "parse_template");
         
         return $this->$function("global", "global_lightbox_warning");
      }
      
      function error($error, $output_html = true)
      {
         $this->templ_vars[] = array("ERROR" => $error);
         
         $function = (($output_html == true) ? "output" : "parse_template");
         
         return $this->$function("global", "global_warning_box");
      }
      
      function message($message, $output_html = false)
      {
         $this->templ_vars[] = array("MESSAGE" => $message);
         
         $function = (($output_html == true) ? "output" : "parse_template");
         
         return $this->$function("global", "global_message_box");
      }
      
      function fatal_error($error) {
         exit("\t\t\t<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">
         <html>
            <head>
               <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
               <title>Fatal Error (Powered by Mihalism Multi Host)</title>
               <style type=\"text/css\">
                   * { font-size: 100%; margin: 0; padding: 0; }
                  body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 75%; margin: 10px; background: #FFFFFF; color: #000000; }
                  a:link, a:visited { text-decoration: none; color: #005fa9; background-color: transparent; }
                  a:active, a:hover { text-decoration: underline; }                  
                  textarea { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; border: 1px dashed #000000; background: #FFFFFF; padding: 5px; background: #f4f4f4; }
               </style>
            </head>
            <body>
               <p><strong>Fatal Error</strong>
               <br /><br />
               {$error}
               <br /><br />
               Application Exited</p>
            </body>
         </html>");
      }   
      
      function bug_fix_56941($html)
      {
         // This check is not too well hidden, but most honest people
         // will not bother looking for it to claim something as their own.
         // Honest people would actually contact support@mihalism.net
         // to obtain a lifetime $50 license to remove the actual check.
         
         if ($this->mmhclass->info->site_installed == true) {
            if ($this->mmhclass->funcs->is_null($this->mmhclass->info->config['paid_removal']) == false && $this->mmhclass->funcs->is_null($this->mmhclass->info->config['server_license']) == false) {
               if ($this->mmhclass->info->config['paid_removal'] === $this->mmhclass->info->config['server_license']) {
                  if ((int)$this->mmhclass->info->config['removal_checked'] == 0) {
                     if ((int)$this->mmhclass->funcs->get_http_content(sprintf($this->mmhclass->funcs->ascii2string($this->cif_check['theurl']), base64_encode(serialize(array("site" => $this->mmhclass->input->server_vars['http_host'])))), 1) == 1) {
                        $result = $this->mmhclass->db->query("INSERT INTO `[1]` (`config_key`, `config_value`) VALUES ('removal_checked', 1);", array(MYSQL_SITE_SETTINGS_TABLE));
                     } else {
                        $this->fatal_error($this->mmhclass->funcs->ascii2string($this->cif_check['therror']));
                     }
                  } else {
                     $skipcheck = true;
                  }
               }
            }
            
            if ($skipcheck == false) {
               if (stripos($html, $this->mmhclass->funcs->ascii2string($this->cif_check['thematch'])) === false) {
                  $this->fatal_error($this->mmhclass->funcs->ascii2string($this->cif_check['therror']));
               }   
            }
         }
         
         return $html;
      }
      
      /* ============================================================================================
      The following functions are a few basic global implementations of the template engine. They are
      located in this file because there is not really any other place that makes sense to place them.
      ============================================================================================ */

      function pagelinks($base_url, $total_results)
      {
         $base_url .= ((strpos($base_url, "?") !== false) ? "&amp;" : "?");
         $total_pages = ceil($total_results / $this->mmhclass->info->config['max_results']);
         $current_page = (($this->mmhclass->info->current_page > $total_pages) ? $total_pages : $this->mmhclass->info->current_page);
         
         if ($total_pages < 2) {
            $template_html = $this->mmhclass->lang['3384'];
         } else {
            $template_html = (($current_page > 1) ? sprintf($this->mmhclass->lang['3484'], sprintf("%spage=%s", $base_url, ($this->mmhclass->info->current_page - 1))) : NULL);
            
            for ($i = 1; $i <= $total_pages; $i++) {
               if ($i == $current_page) {
                  $template_html .= sprintf("<strong>%s</strong>", $this->mmhclass->funcs->format_number($i));
               } else {
                  if ($i < ($current_page - 5)) { continue; }
                  if ($i > ($current_page + 5)) { break; }
                  
                  $template_html .= sprintf("<a href=\"%spage=%s\">%s</a>", $base_url, $i, $this->mmhclass->funcs->format_number($i));
               }
            }
            
            $template_html .= (($current_page < $total_pages) ? sprintf($this->mmhclass->lang['5475'], sprintf("%spage=%s", $base_url, ($this->mmhclass->info->current_page + 1))) : NULL);
            $template_html = sprintf($this->mmhclass->lang['7033'], $current_page, $total_pages, $template_html);
            
         /* Go To Page */
          if(isset($this->mmhclass->input->get_vars['page']) && !is_numeric($this->mmhclass->input->get_vars['page'])){
            $this->mmhclass->templ->error("Page must be a number!<br /><br /><a href=\"javascript:void(0);\" onclick=\"history.go(-1);\">Return to Previous Page</a>", true);
          } else {

          $query = $_SERVER["QUERY_STRING"];

          $string = ((empty($query)) ? NULL : "?" . $query);

          $currentFile = $_SERVER["SCRIPT_NAME"];
          $parts = Explode('/', $currentFile);
          $currentFile = $parts[count($parts) - 1];
          $action = $currentFile . $string;

          $get_val = $this->mmhclass->input->get_vars['act'];
          $gal_val = (int)$this->mmhclass->input->get_vars['gal'];
          $cat_val = (int)$this->mmhclass->input->get_vars['cat'];
          $get_var = ((empty($get_val)) ? NULL : "<input type=\"hidden\" name=\"act\" value=\"{$get_val}\">");
          $gal_var = ((empty($gal_val)) ? NULL : "<input type=\"hidden\" name=\"gal\" value=\"{$gal_val}\">");
          $cat_var = ((empty($cat_val)) ? NULL : "<input type=\"hidden\" name=\"cat\" value=\"{$cat_val}\">");
          $hidn_vars = $get_var . $gal_var . $cat_var;

          $template_html .= "<form action=\"{$action}\" method=\"get\" id=\"form\">{$hidn_vars}&nbsp;|&nbsp;Go to page:&nbsp;<input type=\"text\" name=\"page\" value=\"\" size=\"3\">&nbsp;<input class=\"button1\" type=\"submit\" value=\"Go\" /></form>";

          }
          /* /END Go To Page */
            
         }
         
         return sprintf($this->mmhclass->lang['5834'], $template_html);
      }

      function file_results($filename){
         if ($this->mmhclass->funcs->is_null($filename) == true || $this->mmhclass->funcs->is_file($filename, $this->mmhclass->info->root_path.$this->mmhclass->info->config['upload_path']) == false) {
            return $this->error(sprintf($this->mmhclass->lang['4552'], $this->mmhclass->image->basename($filename)));
         } else {
            $thumbnail_size = $this->mmhclass->image->scale($this->mmhclass->image->thumbnail_name($filename), 125, 125);
            $this->templ_globals['extension'] = $this->mmhclass->image->file_extension($filename);
            
            $this->templ_vars[] = array(
               "BASE_URL" => $this->mmhclass->info->base_url,
               "FILENAME" => $this->mmhclass->image->basename($filename),
               "SITE_NAME" => $this->mmhclass->info->config['site_name'],
               "UPLOAD_PATH" => $this->mmhclass->info->config['upload_path'],
               "THUMBNAIL_SIZE" => sprintf("style=\"width: %spx; height: %spx;\"", $thumbnail_size['w'], $thumbnail_size['h']),
               "THUMBNAIL" => (($this->mmhclass->funcs->is_file($this->mmhclass->image->thumbnail_name($filename), $this->mmhclass->info->root_path.$this->mmhclass->info->config['upload_path']) == false) ? "{$this->mmhclass->info->base_url}css/images/no_thumbnail.png" : $this->mmhclass->info->base_url.$this->mmhclass->info->config['upload_path'].$this->mmhclass->image->thumbnail_name($filename)),
            );
            
            $template_html = $this->parse_template("upload", "standard_file_results");
            unset($this->templ_globals['extension'], $this->templ_vars);
            
            return $template_html;
         }
      }
   }

?>
Random avatar
supermanz
 
Posts: 5
Joined: Sun Aug 14, 2011 8:27 am

Re: What are core files

Postby supermanz » Wed Aug 17, 2011 8:04 pm

i think the only difference from the original template is that i put go to page mod.
Random avatar
supermanz
 
Posts: 5
Joined: Sun Aug 14, 2011 8:27 am

Re: What are core files

Postby kashwak » Sun Aug 21, 2011 10:59 am

yes everything checks out. glad you got it sorted out.
Join us on Twitter Image
User avatar
kashwak
Site Admin
 
Posts: 138
Joined: Fri May 27, 2011 7:03 pm

Re: What are core files

Postby supermanz » Tue Aug 23, 2011 11:55 am

any idea what may be the problem ?
Random avatar
supermanz
 
Posts: 5
Joined: Sun Aug 14, 2011 8:27 am


Return to MMH Archives



Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron
Scroll to top