当调用phpmyadmin网站的“保存文件”对话框出现application/x-httpd-php-
,所以我的服务器不执行phpmyadmin的PHP脚本,但将代码传输到我的浏览器。其他的PHP如roundcube或ispconfig可以像预期的那样工作。PHP的Phpmyadmin不会执行,但其他PHP脚本工作
- 我在这里发现了一个话题,说明在php.ini中启用short_open_tags,但没有帮助(即它已默认启用)。
- 另外,我检查了安装并启用了apache 2 php5模块。
- 在日志文件中显然没有错误列出。
- 我想知道是否phpmyadmin.conf甚至被视为,因为只有一个符号链接指向/ usr/share/phpmyadmin在etc/apache2/conf.d /目录中,但由于Alias/phpmyadmin工作,这不是问题。
- 我检查了apache2配置文件,但找不到任何错误。
不过,我想在这里发布一些: apache2.conf
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
DefaultType None
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
Include mods-enabled/*.load
Include mods-enabled/*.conf
Include ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
Include conf.d/
Include sites-enabled/
phpmyadmin.conf
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
</IfModule>
</Directory>
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>
这些都是启用的Apache 2的mods:
actions alias auth_basic auth_digest authn_file authz_default authz_groupfile authz_host authz_user autoindex cgi dav dav_fs deflate dir env fcgid include mime negotiation php5 reqtimeout rewrite ruby setenvif ssl status suexec suphp
和安装的软件包有关pache 2或者php:
ii libapache2-mod-php5 5.4.4-14 i386 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-suphp 0.7.1-3 i386 Apache2 module to run PHP scripts with the owner permissions
ii php-auth 1.6.2-1 all PHP PEAR modules for creating an authentication system
ii php-pear 5.4.4-14 all PEAR - PHP Extension and Application Repository
ii php5 5.4.4-14 all server-side, HTML-embedded scripting language (metapackage)
ii php5-cgi 5.4.4-14 i386 server-side, HTML-embedded scripting language (CGI binary)
ii php5-cli 5.4.4-14 i386 command-line interpreter for the php5 scripting language
ii php5-common 5.4.4-14 i386 Common files for packages built from the php5 source
ii php5-curl 5.4.4-14 i386 CURL module for php5
ii php5-gd 5.4.4-14 i386 GD module for php5
ii php5-imagick 3.1.0~rc1-1+b2 i386 ImageMagick module for php5
ii php5-imap 5.4.4-14 i386 IMAP module for php5
ii php5-intl 5.4.4-14 i386 internationalisation module for php5
ii php5-mcrypt 5.4.4-14 i386 MCrypt module for php5
ii php5-mysql 5.4.4-14 i386 MySQL module for php5
ii phpmyadmin 4:3.4.11.1-2 all MySQL web administration tool
ii suphp-common 0.7.1-3 i386 Common files for mod suphp
ii apache2 2.2.22-13 i386 Apache HTTP Server metapackage
ii apache2-doc 2.2.22-13 all Apache HTTP Server documentation
ii apache2-mpm-prefork 2.2.22-13 i386 Apache HTTP Server - traditional non-threaded model
ii apache2-suexec 2.2.22-13 i386 Standard suexec program for Apache 2 mod_suexec
ii apache2-utils 2.2.22-13 i386 utility programs for webservers
ii apache2.2-bin 2.2.22-13 i386 Apache HTTP Server common binary files
ii apache2.2-common 2.2.22-13 i386 Apache HTTP Server common files
ii libapache2-mod-fcgid 1:2.3.6-1.2 i386 an alternative module compat with mod_fastcgi
ii libapache2-mod-php5 5.4.4-14 i386 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-ruby 1.2.6-2 i386 Embedding Ruby in the Apache2 web server
ii libapache2-mod-suphp 0.7.1-3 i386 Apache2 module to run PHP scripts with the owner permissions
我在这里没有什么想法了。 我需要提一下,我错误地直接从Debian 5升级到了Debian 7,这是一个很大的麻烦,并且造成了很多麻烦。目前的这个问题是其中的一部分,可能会涉及到奇怪的原因,比如折旧的配置条目或其他。
你安装什么版本的phpMyAdmin? – Pitchinnate 2013-05-07 16:13:13
4:3.4.11.1-2,我在原帖 – Martur 2013-05-07 16:23:11