title: phpmyadmin apache configuration index.php
body: <p>I was trying to use phpMyAdmin with Apache hence downloaded them, read online that i have to change index.html to index.php to get the correct pg when accessing localhost/phpmyadmin. However when i do that something else appears...helpp me! </p>
  
  <p>It says this when i type localhost/phpmyadmin,</p>
  
  <pre><code>&lt;?php
  /* vim: set expandtab sw=4 ts=4 sts=4: */
  /**
   * Main loader script
   *
   * @package PhpMyAdmin
   */
  
  /**
   * Gets some core libraries and displays a top message if required
   */
  require_once 'libraries/common.inc.php';
  
  /**
   * display Git revision if requested
   */
  require_once 'libraries/display_git_revision.lib.php';
  
  /**
   * pass variables to child pages
   */
  $drops = array(
      'lang',
      'server',
      'collation_connection',
      'db',
      'table'
  );
  foreach ($drops as $each_drop) {
      if (array_key_exists($each_drop, $_GET)) {
          unset($_GET[$each_drop]);
      }
  }
  unset($drops, $each_drop);
  
  /*
   * Black list of all scripts to which front-end must submit data.
   * Such scripts must not be loaded on home page.
   *
   */
   $target_blacklist = array (
      'import.php', 'export.php'
      );
  
  // If we have a valid target, let's load that script instead
  if (! empty($_REQUEST['target'])
      &amp;&amp; is_string($_REQUEST['target'])
      &amp;&amp; ! preg_match('/^index/', $_REQUEST['target'])
      &amp;&amp; ! in_array($_REQUEST['target'], $target_blacklist)
      &amp;&amp; in_array($_REQUEST['target'], $goto_whitelist)
  ) {
      include $_REQUEST['target'];
      exit;
  }
  
  // See FAQ 1.34
  if (! empty($_REQUEST['db'])) {
      $page = null;
      if (! empty($_REQUEST['table'])) {
          $page = $GLOBALS['cfg']['DefaultTabTable'];
      } else {
          $page = $GLOBALS['cfg']['DefaultTabDatabase'];
      }
      include $page;
      exit;
  }
  
  /**
   * Check if it is an ajax request to reload the recent tables list.
   */
  require_once 'libraries/RecentFavoriteTable.class.php';
  if ($GLOBALS['is_ajax_request'] &amp;&amp; ! empty($_REQUEST['recent_table'])) {
      $response = PMA_Response::getInstance();
      $response-&gt;addJSON(
          'list',
          PMA_RecentFavoriteTable::getInstance('recent')-&gt;getHtmlList()
      );
      exit;
  }
  
  if ($GLOBALS['PMA_Config']-&gt;isGitRevision()) {
      if (isset($_REQUEST['git_revision']) &amp;&amp; $GLOBALS['is_ajax_request'] == true) {
          PMA_printGitRevision();
          exit;
      }
      echo '&lt;div id="is_git_revision"&gt;&lt;/div&gt;';
  }
  more.....
  </code></pre>