phpmyadmin显示文本代替登录页面

时间:2016-07-25 07:37:06

标签: phpmyadmin

localhost/phpmyadmin显示代替登录页面的文字。我使用apache2 web服务器访问PHPMyAdmin

网页显示如下代码,还有更多: -

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/

4 个答案:

答案 0 :(得分:11)

你必须安装apache2 php包。

sudo apt install php libapache2-mod-php

答案 1 :(得分:2)

我遇到了同样的问题,试试这个:

sudo gedit /etc/apache2/apache2.conf

<Directory>标记处或附近添加:

<Directory /usr/share/phpMyAdmin/> Options FollowSymLinks php_flag engine on Require all granted </Directory>

答案 2 :(得分:0)

这可能是由配置文件中的错误更改引起的,该更改终止了字符串(使用&#39;)或代码块(使用?&gt;)。如果您没有手动执行此操作,那么您的网站可能会被黑客入侵。检查配置文件并尝试重新安装phpMyAdmin并将配置文件设置为只读。

编辑:您能否包括您的phpMyAdmin版本和/或其安装包的链接。

答案 3 :(得分:0)

在安装PHP 7.3、7.2和5.6,然后清除PHP 5.6和PHP 7.3之后,我也发生了同样的事情。

我执行了以下步骤:

  1. data_file[,2][data_file[,2] == "."] = paste(data_file[,1][data_file[,2] == "."], data_file[,4][data_file[,2] == "."], sep = "_")
  2. a2enmod php7.3

然后一切正常。

相关问题