2016-07-25 115 views
2

localhost/phpmyadmin顯示文本以代替登錄頁面。我使用apache2 web服務器訪問PHPMyAdminphpmyadmin在登錄頁面顯示文本

該網頁顯示的代碼如下,並有更多: -

addJSON('list', PMA_RecentFavoriteTable::getInstance('recent')->getHtmlList()); exit; } if ($GLOBALS['PMA_Config']->isGitRevision()) { if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) { PMA_printGitRevision(); exit; } echo ' 
'; } // Handles some variables that may have been sent by the calling script $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; $show_query = '1'; // Any message to display? if (! empty($message)) { echo PMA_Util::getMessage($message); unset($message); } $common_url_query = PMA_URL_getCommon(); $mysql_cur_user_and_host = ''; // when $server > 0, a server has been chosen so we can display // all MySQL-related information if ($server > 0) { include 'libraries/server_common.inc.php'; include 'libraries/StorageEngine.class.php'; // Use the verbose name of the server instead of the hostname // if a value is set $server_info = ''; if (! empty($cfg['Server']['verbose'])) { $server_info .= htmlspecialchars($cfg['Server']['verbose']); if ($GLOBALS['cfg']['ShowServerInfo']) { $server_info .= ' ('; } } if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) { $server_info .= $GLOBALS['dbi']->getHostInfo(); } if (! empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) { $server_info .= ')'; } $mysql_cur_user_and_host = $GLOBALS['dbi']->fetchValue('SELECT USER();'); // should we add the port info here? $short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose']) ? $GLOBALS['cfg']['Server']['verbose'] : $GLOBALS['cfg']['Server']['host']); } echo ' 
' . "\n"; // Anchor for favorite tables synchronization. echo PMA_RecentFavoriteTable::getInstance('favorite')->getHtmlSyncFavoriteTables(); echo ' 
'; if ($server > 0 || count($cfg['Servers']) > 1) { if ($cfg['DBG']['demo']) { echo ' 
'; echo ' 

更新 我能夠嘗試這個瀏覽器來解決這個問題: - http://localhost/phpmyadmin/

+0

看起來像編碼問題。也許一些非法字符被解析爲?>,它終止代碼塊。 –

+0

我沒有改變任何東西。它一直工作到昨天,但今天突然停止。 –

+0

Apache似乎沒有解釋PHP指令。這可能是因爲你的PHP模塊沒有在apache中啓用或激活。 類似於:http://stackoverflow.com/questions/22478365/cant-load-phpmyadmin-index-site – user6815451

回答

0

這可能是由配置文件中發生錯誤的變化引起的,該變化終止了字符串(帶')或代碼塊(帶?>)。如果您沒有手動執行該操作,那麼您的網站可能會被黑客入侵。檢查你的配置文件,並嘗試重新安裝phpMyAdmin並將配置文件設置爲只讀。

編輯:你可以請包括您的phpMyAdmin的版本和/或它的安裝包的鏈接。

7

你必須安裝apache2 php包。

sudo apt install php libapache2-mod-php