0

Not sure where to go here, been looking all over the place for an answer; so, I figured I'd try here. I have an Ubuntu 14.04 LTS server running apache2, mysql, php5, etc. All is running fine, my one website (which is almost entirely written in PHP) runs perfectly: accesses database and everything. My problem is that I cannot get on to phpmyadmin. Everythime I go to http://ip.address/phpmyadmin it wants to download a file instead of running the script. Everything was working fine up to about a week ago; and, I do not recall changing any settings that would have gummed up the works. I do a lot of my database work away from home; and use phpmyamin quite frequently to change and update things. so, this issue is quite the annoyance. Any help would be appreciated. Let me know what information I should post for everyone to look at; I haven't the first idea of where to start looking.

Thanks

Edit - I should add that I have Virtualmin/webmin installed running three virtual hosts. I have already tried purging phpmyadmin and reinstalling it, to no avail. I've followed several suggestions I have found to add symlinks, editing config files, checking for an instlalling modules (all which were already installed and running).

IDCrisis
  • 41
  • 6

2 Answers2

0

After discovering that it doesn't handle it correctly as PHP, you should check the methods described here. Since you already have PHP installed (other app works), go straight to part If PHP is installed.

Community
  • 1
  • 1
Roope Hakulinen
  • 7,326
  • 4
  • 43
  • 66
  • I'll check it out and let you know what I find. Thanks. – IDCrisis Dec 20 '14 at 21:24
  • the httpd.conf file it is referring to, is it this one? /etc/apache2/conf-available/httpd.conf – IDCrisis Dec 20 '14 at 21:27
  • Sorry, I rarely configurate Apache servers, but I would assume it is either _/etc/apache2/httpd.conf_ or _/etc/apache2/conf-enabled/httpd.conf_ more preferably. It differs based on OS and versions of Apache, where the actual conf files exist.. – Roope Hakulinen Dec 20 '14 at 21:31
  • I just noticed, that post is telling me to add a .dll file, isn't that a windows only file? – IDCrisis Dec 20 '14 at 21:34
  • Yes, that question for which it is answer, is about a Windows env, but the concept shouldn't differ that much from Linux world. You can skip that step and move to ensure that the correct _AddType_ directive is applied. If that is there and it generally seems to have all the components needed, you should try to find vhost configuration for the PHPMyAdmin and see if there is something conflicting. Also if you run _service apache2 restart_ to restart Apache, is there some errors generated? – Roope Hakulinen Dec 20 '14 at 21:42
  • There are no error messages when restarting Apache; I've done that a hundred times already--lol. Will have to look for vhost configuration settings. Not sure where to look for those; however, it will have to wait until later this evening I will post an update when I find it. – IDCrisis Dec 20 '14 at 21:53
  • I added another edit showing a couple of file that do not seem to jive. – IDCrisis Dec 21 '14 at 00:25
  • Sorry mate, I simply am not Apache guru. :( Only thing in those directives that seemed to be able make it not work is the _# Deny access to files without filename (e.g. '.php') _ starting block. Try removing that block first. If no success, you might want to consider about going to [Server Fault](http://serverfault.com/) (that is like Stack Overflow for server configuration) to get the answer from more experienced people on that topic. Also just came in my mind that you might want to play around with the permissions assigned for PHPMyAdmin folder. – Roope Hakulinen Dec 21 '14 at 09:16
0

Here is teh output of my httpd.conf file, if anyone is interested:

ServerName desktop

# Make sure there's only **1** line for each of these 2 directives:
# Use for PHP 4.x:
#LoadModule php4_module modules/libphp4.so
#AddHandler php-script  .php

# Use for PHP 5.x:
LoadModule php5_module  modules/libphp5.so
AddHandler php5-script  .php 

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php

AddType text/html   .php

# PHP Syntax Coloring
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps
AddType application/x-httpd-php .php

And here is my php5.conf file:

<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
#   SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
#   SetHandler application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
        <Directory /home/*/public_html>
#            php_admin_value engine Off
        </Directory>
    </IfModule>
</IfModule>
IDCrisis
  • 41
  • 6