安装hph,输入localhost/phpMyAdmin显示页面如下:
Index   of   /phpMyAdmin
  Name                                         Last   modified               Size     Description
--------------------------------------------------------------------------
  Parent   Directory                 21-Mar-2003   10:26             -    
  ANNOUNCE.txt                         23-Feb-2003   12:51           9k    
  CREDITS                                   19-Aug-2001   13:06           1k    
  ChangeLog                               23-Feb-2003   12:55       142k    
  Documentation.html             23-Feb-2003   12:52       110k    
  Documentation.txt               23-Feb-2003   12:55         88k    
  INSTALL                                   03-Aug-2001   02:19           1k    
  LICENSE                                   03-Aug-2001   07:04         15k    
  RELEASE-DATE-2.4.0             23-Feb-2003   13:03           1k    
  TODO                                         03-Aug-2001   07:18           1k    
  badwords.txt                         17-Apr-2002   13:00           2k    
  chk_rel.php                           23-Feb-2003   13:05           1k    
  config.inc.php                     23-Feb-2003   13:05         22k    
  db_create.php                       23-Feb-2003   13:05           1k    
  db_datadict.php                   23-Feb-2003   13:05           9k    
  db_details.php                     23-Feb-2003   13:05           8k    
  db_details_common.php       23-Feb-2003   13:05           2k    
  db_details_db_info.php     23-Feb-2003   13:05           3k    
  db_details_export.php       23-Feb-2003   13:05           7k    
  db_details_importdoc..>   23-Feb-2003   13:05           6k    
  db_details_links.php         23-Feb-2003   13:05           2k    
  db_details_qbe.php             23-Feb-2003   13:05         37k    
  db_details_structure..>   23-Feb-2003   13:05         20k    
  db_printview.php                 23-Feb-2003   13:05           9k    
  db_search.php                       23-Feb-2003   13:05         14k    
  docs.css                                 23-Feb-2003   12:12           3k    
  footer.inc.php                     23-Feb-2003   13:05           1k    
  images/                                   21-Mar-2003   10:26             -    
  index.php                               23-Feb-2003   13:05           2k    
  lang/                                       21-Mar-2003   10:26             -    
  ldi_check.php                       23-Feb-2003   13:05           5k    
  ldi_table.php                       23-Feb-2003   13:05           4k    
  left.php                                 23-Feb-2003   13:05         20k    
  libraries/                             21-Mar-2003   10:26             -    
  main.php                                 23-Feb-2003   13:05         22k    
  mult_submits.inc.php         23-Feb-2003   13:05           7k    
  pdf_pages.php                       23-Feb-2003   13:05         13k    
  pdf_schema.php                     23-Feb-2003   13:05         49k    
  phpinfo.php                           23-Feb-2003   13:05           1k    
  read_dump.php                       23-Feb-2003   13:05         15k    
  scripts/                                 21-Mar-2003   10:26             -    
  server_common.inc.php       23-Feb-2003   13:05           1k    
  server_databases.php         23-Feb-2003   13:05         18k    
  server_links.inc.php         23-Feb-2003   13:05           1k    
  server_privileges.php       23-Feb-2003   13:05         92k    
  server_processlist.php     23-Feb-2003   13:05           3k    
  server_status.php               23-Feb-2003   13:05         12k    
  server_variables.php         23-Feb-2003   13:05           3k    
  sql.php                                   23-Feb-2003   13:05         26k    
  tbl_addfield.php                 23-Feb-2003   13:05           8k    
  tbl_alter.php                       23-Feb-2003   13:05           5k    
  tbl_change.php                     23-Feb-2003   13:05         27k    
  tbl_create.php                     23-Feb-2003   13:05           7k    
  tbl_dump.php                         23-Feb-2003   13:05         16k    
  tbl_indexes.php                   23-Feb-2003   13:05         20k    
  tbl_move_copy.php               23-Feb-2003   13:05           4k    
  tbl_printview.php               23-Feb-2003   13:05         21k    
  tbl_properties.inc.php     23-Feb-2003   13:05         13k    
  tbl_properties.php             23-Feb-2003   13:05           1k    
  tbl_properties_commo..>   23-Feb-2003   13:05           1k    
  tbl_properties_expor..>   23-Feb-2003   13:05           9k    
  tbl_properties_links..>   23-Feb-2003   13:05           3k    
  tbl_properties_opera..>   23-Feb-2003   13:05         13k    
  tbl_properties_optio..>   23-Feb-2003   13:05           8k    
  tbl_properties_struc..>   23-Feb-2003   13:05         21k    
  tbl_properties_table..>   23-Feb-2003   13:05           2k    
  tbl_query_box.php               23-Feb-2003   13:05           8k    
  tbl_relation.php                 23-Feb-2003   13:05         14k    
  tbl_rename.php                     23-Feb-2003   13:05           1k    
  tbl_replace.php                   23-Feb-2003   13:05           6k    
  tbl_replace_fields.php     23-Feb-2003   13:05           6k    
  tbl_select.php                     23-Feb-2003   13:05         10k    
  translators.html                 23-Feb-2003   12:52         12k    
  user_password.php               23-Feb-2003   13:05           5k    
-------------------------------------------------------------------------
Apache/2.2.3(Red Hat)   Server   at   localhost   Port   80输入http://localhost/phpMyAdmin/index.php 出来的是php代码?怎么回事?重启httpd,mysqld服务,重启计算机都试过了,不管事,请大家帮忙。

解决方案 »

  1.   

    将以下两行加入到 Apache 的 httpd.conf 配置文件尾      添加 PHP 模块:LoadModule php5_module "{PHP根路径}/php5apache2.dll"
    AddType application/x-httpd-php .php
      

  2.   

    重启过了,现在一打开http://localhost/phpMyAdmin出现的是:
    <?php
    /* vim: set expandtab sw=4 ts=4 sts=4: */
    /**
     * forms frameset
     *
     * @version $Id: index.php 11402 2008-07-15 18:42:50Z lem9 $
     * @uses    $GLOBALS['strNoFrames']
     * @uses    $GLOBALS['cfg']['QueryHistoryDB']
     * @uses    $GLOBALS['cfg']['Server']['user']
     * @uses    $GLOBALS['cfg']['DefaultTabServer']     as src for the mainframe
     * @uses    $GLOBALS['cfg']['DefaultTabDatabase']   as src for the mainframe
     * @uses    $GLOBALS['cfg']['NaviWidth']            for navi frame width
     * @uses    $GLOBALS['collation_connection']    from $_REQUEST (grab_globals.lib.php)
     *                                              or common.inc.php
     * @uses    $GLOBALS['available_languages'] from common.inc.php (select_lang.lib.php)
     * @uses    $GLOBALS['db']
     * @uses    $GLOBALS['charset']
     * @uses    $GLOBALS['lang']
     * @uses    $GLOBALS['text_dir']
     * @uses    $_ENV['HTTP_HOST']
     * @uses    PMA_getRelationsParam()
     * @uses    PMA_purgeHistory()
     * @uses    PMA_generate_common_url()
     * @uses    PMA_VERSION
     * @uses    session_write_close()
     * @uses    time()
     * @uses    PMA_getenv()
     * @uses    header()                to send charset
     *//**
     * Gets core libraries and defines some variables
     */
    require_once './libraries/common.inc.php';/**
     * Includes the ThemeManager if it hasn't been included yet
     */
    require_once './libraries/relation.lib.php';// free the session file, for the other frames to be loaded
    session_write_close();// Gets the host name
    // loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
    if (empty($HTTP_HOST)) {
        if (PMA_getenv('HTTP_HOST')) {
            $HTTP_HOST = PMA_getenv('HTTP_HOST');
        } else {
            $HTTP_HOST = '';
        }
    }
    // purge querywindow history
    $cfgRelation = PMA_getRelationsParam();
    if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
        PMA_purgeHistory($GLOBALS['cfg']['Server']['user']);
    }
    unset($cfgRelation);
    /**
     * pass variables to child pages
     */
    $drops = array('lang', 'server', 'convcharset', 'collation_connection',
        'db', 'table');foreach ($drops as $each_drop) {
        if (! array_key_exists($each_drop, $_GET)) {
            unset($_GET[$each_drop]);
        }
    }
    unset($drops, $each_drop);if (! strlen($GLOBALS['db'])) {
        $main_target = $GLOBALS['cfg']['DefaultTabServer'];
    } elseif (! strlen($GLOBALS['table'])) {
        $_GET['db'] = $GLOBALS['db'];
        $main_target = $GLOBALS['cfg']['DefaultTabDatabase'];
    } else {
        $_GET['db'] = $GLOBALS['db'];
        $_GET['table'] = $GLOBALS['table'];
        $main_target = $GLOBALS['cfg']['DefaultTabTable'];
    }$url_query = PMA_generate_common_url($_GET);if (isset($GLOBALS['target']) && is_string($GLOBALS['target']) && !empty($GLOBALS['target']) && in_array($GLOBALS['target'], $goto_whitelist)) {
        $main_target = $GLOBALS['target'];
    }$main_target .= $url_query;$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2];
    // start output
    header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
        xml:lang="<?php echo $lang_iso_code; ?>"
        lang="<?php echo $lang_iso_code; ?>"
        dir="<?php echo $GLOBALS['text_dir']; ?>">
    <head>
    <link rel="icon" href="./favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
    <title>phpMyAdmin <?php echo PMA_VERSION; ?> -
        <?php echo htmlspecialchars($HTTP_HOST); ?></title>
    <meta http-equiv="Content-Type"
        content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
    <script type="text/javascript">
    // <![CDATA[
        // definitions used in querywindow.js
        var common_query = '<?php echo PMA_escapeJsString(PMA_generate_common_url('', '', '&'));?>';
        var opendb_url = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['DefaultTabDatabase']); ?>';
        var safari_browser = <?php echo PMA_USR_BROWSER_AGENT == 'SAFARI' ? 'true' : 'false' ?>;
        var querywindow_height = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowHeight']); ?>;
        var querywindow_width = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowWidth']); ?>;
        var collation_connection = '<?php echo PMA_escapeJsString($GLOBALS['collation_connection']); ?>';
        var lang = '<?php echo PMA_escapeJsString($GLOBALS['lang']); ?>';
        var server = '<?php echo PMA_escapeJsString($GLOBALS['server']); ?>';
        var table = '<?php echo PMA_escapeJsString($GLOBALS['table']); ?>';
        var db    = '<?php echo PMA_escapeJsString($GLOBALS['db']); ?>';
        var token = '<?php echo PMA_escapeJsString($_SESSION[' PMA_token ']); ?>';
        var text_dir = '<?php echo PMA_escapeJsString($GLOBALS['text_dir']); ?>';
        var pma_absolute_uri = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']); ?>';    // for content and navigation frames    var frame_content = 0;
        var frame_navigation = 0;
        function getFrames() {
    <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
            frame_content = window.frames[1];
            frame_navigation = window.frames[0];
    <?php } else { ?>
            frame_content = window.frames[0];
            frame_navigation = window.frames[1];
    <?php } ?>
        }
        var onloadCnt = 0; 
        var onLoadHandler = window.onload;
        window.onload = function() {
            if (onloadCnt == 0) {
                if (typeof(onLoadHandler) == "function") { 
                    onLoadHandler(); 
                }
                if (typeof(getFrames) != 'undefined' && typeof(getFrames) == 'function') { 
                    getFrames(); 
                }
                onloadCnt++;
            }
        };
    // ]]>
    </script>
    <script src="./js/querywindow.js" type="text/javascript"></script>
    </head>
    <frameset cols="<?php
    if ($GLOBALS['text_dir'] === 'rtl') {
        echo '*,';
    }
    echo $GLOBALS['cfg']['NaviWidth'];
    if ($GLOBALS['text_dir'] === 'ltr') {
        echo ',*';
    }
    ?>" rows="*" id="mainFrameset">
        <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
        <frame frameborder="0" id="frame_navigation"
            src="navigation.php<?php echo $url_query; ?>"
            name="frame_navigation" />
        <?php } ?>
        <frame frameborder="0" id="frame_content"
            src="<?php echo $main_target; ?>"
            name="frame_content" />
        <?php if ($GLOBALS['text_dir'] === 'rtl') { ?>
        <frame frameborder="0" id="frame_navigation"
            src="navigation.php<?php echo $url_query; ?>"
            name="frame_navigation" />
        <?php } ?>
        <noframes>
            <body>
                <p><?php echo $GLOBALS['strNoFrames']; ?></p>
            </body>
        </noframes>
    </frameset>
    </html>
    很是郁闷。。
      

  3.   


    加上了之后出现了[root@localhost conf]# service httpd restart
    停止 httpd:                                               [失败]
    启动 httpd:httpd: Syntax error on line 998 of /etc/httpd/conf/httpd.conf: LoadModule takes two arguments, a module name and the name of a shared object file to load it from
          [失败]