Linux.com

Home Linux Community Forums Software Installation Adminer and phpmyadmin - problem

Adminer and phpmyadmin - problem

Link to this post 15 May 12

Guys,

need ur help

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

Adminer
-------
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
/** 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
===================================================

Link to this post 15 May 12

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)

Regards

Link to this post 15 May 12

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

Link to this post 16 May 12

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>
<IfModule worker.c>
LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# 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!

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board