简体   繁体   English

php脚本在Ubuntu 14.04服务器上运行,phpmyadmin不运行

[英]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. 我有一台运行apache2,mysql,php5等的Ubuntu 14.04 LTS服务器。一切运行良好,我的一个网站(几乎完全用PHP编写)运行完美:访问数据库和所有内容。 My problem is that I cannot get on to phpmyadmin. 我的问题是我无法继续使用phpmyadmin。 Everythime I go to http://ip.address/phpmyadmin it wants to download a file instead of running the script. Everythime我转到http://ip.address/phpmyadmin,它要下载文件而不是运行脚本。 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. 并经常使用phpmyamin进行更改和更新。 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. 编辑-我应该补充一点,我已经安装了运行三个虚拟主机的Virtualmin / webmin。 I have already tried purging phpmyadmin and reinstalling it, to no avail. 我已经尝试清除phpmyadmin并重新安装它,但无济于事。 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 . 发现它不能像PHP那样正确处理后,应检查此处介绍的方法。 Since you already have PHP installed (other app works), go straight to part If PHP is installed . 由于您已经安装了PHP(其他应用程序也可以运行),因此请直接参见如果已安装PHP

Here is teh output of my httpd.conf file, if anyone is interested: 如果有人感兴趣,这是我的httpd.conf文件的输出:

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: 这是我的php5.conf文件:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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