简体   繁体   中英

php scripts run on Ubuntu 14.04 server, phpmyadmin does not

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).

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 .

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM