Welcome to the Linux Foundation Forum!

Adminer and phpmyadmin - problem



need ur help

I have setup the adminer and phpmyadmin on Redhat Linux Enterprise 5.



Download the editor and edtor.mysql with created 2 subfolders, folder 'ad' for Adminer 'editor' and 'editormysql' and folder 'myphp' for phpmyadmin into www/html folder .

When i tried to open the file as http://localhost/ad/editor.php or editormysql.php, it open as script file not the main output. same for phpmyadmin. Please help how to open the file. Do I need to permission 'chmod' to folder and the file?

appreciate ur help guys.

like below:-


<?php<br />
/** Adminer Editor - Compact database editor

* @link http://www.adminer.org/

* @author Jakub Vrana, http://www.vrana.cz/

* @copyright 2009 Jakub Vrana

* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0

* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)

* @version 3.3.4

*/error_reporting(6135);$zb=!ereg('^(unsafe_raw)?$',ini_get("filter.default"));if($zb||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$W){$ae=filter_input_array(constant("INPUT$W"),FILTER_UNSAFE_RAW);if($ae){$$W=$ae;}}}if(isset($_GET["file"])){header("Expires: ".gmdate("D, d M Y H:i:s",time()+365*24*60*60)." GMT");if($_GET["file"]=="favicon.ico"){header("Content-Type: image/x-icon");echo



  • marc
    marc Posts: 647
    You do not have php installed on your system hence providing you the file in plain text (without interpreting the php code).

    Install php and related things (as well as make sure it's enable in apache)

  • vanesn
    vanesn Posts: 2
    thanks for the reply.

    installed php
    test again the php still same for phpmyadmin and adminer

    pls let me know if missed out anything. do i need to change anything on the setup files such as config or etc.

    pls le tme know

    and refer the attachment
    php.jpg 155.1K
  • marc
    marc Posts: 647
    1- Create a file php.conf with this content:
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    <IfModule prefork.c>
    LoadModule php5_module modules/libphp5.so
    <IfModule worker.c>
    LoadModule php5_module modules/libphp5-zts.so

    # Cause the PHP interpreter to handle files with a .php extension.
    AddHandler php5-script .php
    AddType text/html .php

    # Add index.php to the list of files that will be served as directory
    # indexes.
    DirectoryIndex index.php

    # Uncomment the following line to allow PHP to pretty-print .phps
    # files as PHP source code:
    #AddType application/x-httpd-php-source .phps

    2- Then make sure there's a rule that includes your newcly created config file:
    Include route/to/file.conf

    3- Restart your apache server
    4- Enjoy!


Upcoming Training