LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-21-2015, 03:26 AM   #1
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Rep: Reputation: Disabled
phpMyAdmin shows directory


hello gentlemen,
I've got some issue, regarding my phpMyAdmin. my problem is whenever I put localhost/phpMyAdmin in browser, it shows a directory instead of database. help me out how I want to have a database page instead of directory page.Click image for larger version

Name:	directory.jpg
Views:	397
Size:	145.8 KB
ID:	19640
 
Old 09-21-2015, 06:40 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Do you have php module for your webserver installed? Whats the default page for the directory phpMyAdmin resides within? This directive is used if the URI ends on / and not a file name. It normaly is set to index.html. Just phpMyAdmin uses index.php IIRC.
 
Old 09-21-2015, 09:48 AM   #3
urbanwks
Member
 
Registered: Sep 2003
Distribution: Slackware64-Current, FreeBSD 12.1, Alpine 5.4, Manjaro 19, Alpine on WSL [Win10]
Posts: 194

Rep: Reputation: 213Reputation: 213Reputation: 213
your httpd.conf probably has a line that looks like this:

Code:
DirectoryIndex index.html
...change it to this:

Code:
DirectoryIndex index.html index.php
and restart apache.

(provided that you have php installed and otherwise setup, of course)
 
Old 09-21-2015, 11:21 PM   #4
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by urbanwks View Post
your httpd.conf probably has a line that looks like this:

Code:
DirectoryIndex index.html
...change it to this:

Code:
DirectoryIndex index.html index.php
and restart apache.

(provided that you have php installed and otherwise setup, of course)
Hi, I already add index.php at line DirectoryIndex at /etc/httpd/conf/httpd.conf
I manage to restart my httpd. After that, I go to my browser and put localhost/phpMyAdmin it shows:-

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Main loader script
*
* @package PhpMyAdmin
*/

/**
* Gets some core libraries and displays a top message if required
*/
require_once 'libraries/common.inc.php';

/**
* display Git revision if requested
*/
require_once 'libraries/display_git_revision.lib.php';
...
....
.....
......
.......
}
?>

it shows the code. what i'm supposedly to do to run normally.
 
Old 09-22-2015, 08:08 AM   #5
urbanwks
Member
 
Registered: Sep 2003
Distribution: Slackware64-Current, FreeBSD 12.1, Alpine 5.4, Manjaro 19, Alpine on WSL [Win10]
Posts: 194

Rep: Reputation: 213Reputation: 213Reputation: 213
you're probably not loading the php module, so your server just treats it like a text file since it doesn't know what to do with it.

make sure you have a line in your httpd.conf, something like:

Code:
LoadModule php5_module modules/libphp5.so
...depending on your php version.

this is a good reference and place to start: http://php.net/manual/en/install.unix.apache2.php
 
Old 09-24-2015, 08:51 PM   #6
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by urbanwks View Post
you're probably not loading the php module, so your server just treats it like a text file since it doesn't know what to do with it.

make sure you have a line in your httpd.conf, something like:

Code:
LoadModule php5_module modules/libphp5.so
...depending on your php version.

this is a good reference and place to start: http://php.net/manual/en/install.unix.apache2.php
Thank you,
Finally I manage to access my phpMyAdmin.
I follow your step.
May God bless you.
 
  


Reply

Tags
phpmyadmin



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
phpmyadmin shows 404 error nitishdola Linux - Newbie 3 08-16-2013 05:06 AM
PhpMyAdmin shows typical unexpected error of not saving settings leosubhadeep Linux - Server 2 09-19-2012 01:53 PM
http://localhost/phpMyAdmin/ shows blank page mpr.mktg Linux - Server 5 04-03-2012 02:24 PM
move phpmyadmin directory ggalan Linux - Newbie 4 01-07-2012 04:07 PM
phpmyadmin shows blank page; no "phpmyadmin" database in mysql qajaq Linux - Software 2 12-20-2009 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration