phpmyadmin shows only text

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
pizzipie
Forum Commoner
Posts: 87
Joined: Wed Feb 10, 2010 10:59 pm
Location: Hayden. ID

phpmyadmin shows only text

Post by pizzipie »

Setting up new installation of Ubuntu MATE 16.04 With PHP 7.0 Apache/2.4.18 and MySql 5.7.18.

I'm trying to use Synaptic to setup phpmyadmin (4:4.6.6-1 +deb.cihar.com-xenial.2). I have Apache2, mysql 5.7 , and php7.0 installed. Apache2 index works in localhost, and mysql can be accessed.

The trouble I'm having is that:

1. Trying to show phpinfo() shows blank page ( /localhost/mytest.php ).

2. phpmyadmin when accessed by ( /localhost/phpmyadmin ) shows nothing but text:

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']->f ........

and on and on.

Help to get this fixed is appreciated.
User avatar
Celauran
Moderator
Posts: 6425
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: phpmyadmin shows only text

Post by Celauran »

Sounds like there's an issue with your Apache configuration not parsing PHP properly rather than something specific with phpMyAdmin. There are myriad reasons this could be. Have you looked at things like this? https://askubuntu.com/questions/760787/ ... 04-upgrade
pizzipie
Forum Commoner
Posts: 87
Joined: Wed Feb 10, 2010 10:59 pm
Location: Hayden. ID

Re: phpmyadmin shows only text

Post by pizzipie »

I tried some of the things pointed out by the site you pointed to. I haveen't a clue what they are talking about, however

I have a MySql database which I access through HTML and PHP scripts. The PHP scripts are not working now. I can't get phpinfo() to show up on the screen either!

I have never had this happen before (10+ years). I just installed the LAMP programs per internet site instructions and bingo everything works.

I have installed and un-installed and purged etc apache2 and PHP7.0 several times now.

Any way I can just wipe out everything and start over (LAMP) that is. Or can I just go back to PHP5.

Thanks R
pizzipie
Forum Commoner
Posts: 87
Joined: Wed Feb 10, 2010 10:59 pm
Location: Hayden. ID

Re: phpmyadmin shows only text

Post by pizzipie »

[SOLVED]

Well, in spite of all the technical stuff in the above internet site here is what solved this for me.

sudo a2enmod php7.0

add: include /etc/phpmyadmin/apache.conf to apache2.conf

As you pointed out, It was an apache2 configuration problem.

Thank you for your help,

R
Post Reply