2016-07-25 109 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