1

I am on arch linux. I have installed apache 2.4.25, php 7.1.6 and mysql 15.1 MariaDB. I then installed phpmyadmin but while accessing http://localhost/phpadmin from my browser, I get the code mentioned below instead of the regular phpmyadmin page. What am I doing wrong?

Here is the first part of the code I get:

isAjax() && ! empty($_REQUEST['recent_table'])){$response->addJSON( 'list', RecentFavoriteTable::getInstance('recent')->getHtmlList() ); exit; } if ($GLOBALS['PMA_Config']->isGitRevision()) { if (isset($_REQUEST['git_revision']) && $response->isAjax()) { 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\libraries\Util::getMessage($message); unset($message); } if (isset($_SESSION['partial_logout'])) { Message::success( __('You were logged out from one server, to logout completely from phpMyAdmin, you need to logout from all servers.') )->display(); unset($_SESSION['partial_logout']); } $common_url_query = 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'; // 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 RecentFavoriteTable::getInstance('favorite')->getHtmlSyncFavoriteTables(); echo '
'; if ($server > 0 || count($cfg['Servers']) > 1 ) { if ($cfg['DBG']['demo']) { echo '
'; echo '
' , __('phpMyAdmin Demo Server') , '
'; echo '

'; printf( __( 'You are using the demo server. You can do anything here, but ' . 'please do not change root, debian-sys-maint and pma users. ' . 'More information is available at %s.' ), 'demo.phpmyadmin.net' ); echo '
'; echo '
'; } echo '
'; echo '

In fact, the codes I write in php run fine, its just that the phpmyadmin page doesn't show. For example, I tried phpinfo(), it displays the page.

Ok, finally got it to work by adding this to my httpd.conf file as suggested in an answer of this post. Thankyou for trying to help me.

# PHP 7 specific configuration
<IfModule php7_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>
</IfModule>
Bibek Shah
  • 457
  • 3
  • 18

0 Answers0