Fatal error: Cannot redeclare MYTHEME_preprocess_page() I'm new at Drupal, so please help to solve the problem. :)
I've found an article: Change templates based on path alias

It describes my situation. But when I include described code or just this line:

function lm_sr4_preprocess_page(&amp;$vars) {}


In mywebsite.com/sites/default/themes/lm_sr4/template.php it just causes this error:

Fatal error: Cannot redeclare lm_sr4_preprocess_page() (previously declared in /var/www/sites/lmsr2.video-site.ru/sites/default/themes/lm_sr4/template.php:11) in /var/www/sites/lmsr2.video-site.ru/sites/default/themes/lm_sr4/preprocess/page.preprocess.inc on line 10

Here's all template.php code:

&lt;?php

/**
 * @file
 * Template overrides as well as (pre-)process and alter hooks for the
 * lm_sr4 theme.
 */



function lm_sr4_preprocess_page(&amp;$vars) {
  $alias_parts = explode('/', drupal_get_path_alias());

  if (count($alias_parts) &amp;&amp; $alias_parts[0] == 'ep') {
    $vars['theme_hook_suggestions'][] = 'page__epcustomtemplate';
  }
}





function lm_sr4_views_tree_inner($variables) {

  $view = $variables['view'];
  $options = $variables['options'];
  $rows = $variables['rows'];
  $title = $variables['title'];
  $result = $variables['result'];
  $parent = $variables['parent'];

  $items = array();
  foreach ($result as $i =&gt; $record) {
    if ($record-&gt;views_tree_parent == $parent) {
      $variables['parent'] = $record-&gt;views_tree_main;
      $items[] = $rows[$i] . call_user_func(__FUNCTION__, $variables);
    }
  }
  return count($items) ? theme('item_list', array(
    'items' =&gt; $items,
    'type' =&gt; $options['type'],
    'attributes' =&gt; array(
      'class' =&gt; array(
        'menu',
      )
    )
  )) : '';
}

function lm_sr4_omega_layout_alter(&amp;$layout) {
  if (arg(0) == 'eparchies') {
    $layout = 'eparchy';
  }
}

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
You have the function lm_sr4_preprocess_page() declared twice; once in template.php (line 11) and once in preprocess/page.preprocess.inc (line 10).

You need to merge those two functions together, you can only declare a function once in PHP.