When i open localhost/phpmyadmin. it shows me list of all files instead of the database. Why it happens ? Any help will be appreciated. below is my screenshot for phpmyadmin
This is because the webserver (which I'm guessing is Apache because of the WAMP tag and because of the look of this list) hasn't been told to use index.php
as a default file and is configured to show a directory listing instead. It generally means you haven't properly (or fully, anyway) configured your PHP installation, because generally the PHP installation instructions I've seen include this step (or do it automatically). So it's possible you additionally haven't installed PHP at all; which you can quickly test by clicking the index.php
link and seeing whether you get a log in page or screen full of gibberish. Anyway, WAMP includes PHP, so I presume at this point that you've just got the index.php configuration problem, so:
In your Apache configuration, find the line for DirectoryIndex
. You'll need to add index.php to the list. For example, mine looks like:
DirectoryIndex index.php index.html home.pl index.cgi
You probably don't need all of those and should only add index.php; don't just copy and paste my line, it's just given as an example.
This is the list of files that Apache looks for to run as the main page of a folder/subdirectory. If it can't find any of the listed files then it generally shows the listing of all files in that directory (which is controlled by mod_autoindex, if you're interested in learning more).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With