phpMyAdmin的PHP的不执行,但其他的PHP脚本工作 [英] PHP of Phpmyadmin does not execute but other php scripts work
问题描述
在调用phpmyadmin的网站保存文件对话框出现应用程序/ X的httpd - PHP -
所以我的服务器不执行phpmyadmin的PHP脚本,但转让code到我的浏览器。其他PHP如roundcube或ispconfig工作像预想的那样。
When calling the phpmyadmin website a "save file" dialog appears for application/x-httpd-php-
so my server does not execute the phpmyadmin php script but transfers the code to my browser. Other php such as roundcube or ispconfig work as supposed.
- 我发现这里一个主题,指出以使在php.ini项short_open_tags,但没有帮助(即,它已被默认启用)。
- 另外,我检查,以安装并启用了Apache 2 PHP5模块。
- 在日志文件显然没有任何错误列。
- 我想知道如果phpmyadmin.conf甚至认为,因为只有一个符号链接指向在etc / apache2的/ conf.d /目录/ usr /共享/ phpMyAdmin的,但由于别名/ phpMyAdmin的作品,这是不的问题。
- 我查了Apache2的配置文件,但找不到任何错误。
不过,我想在这里发表一些:
apache2.conf
Nevertheless I'd like to post some here: 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
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:
These are the enabled 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
和相关的Apache 2或PHP安装的软件包:
and the installed packages related to apache 2 or 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这是一个很大的痛苦,造成了很大的麻烦。这个目前的问题是它的一部分,并可能有怪异的原因涉及到,如德preciated配置项或什么的。
I am running out of ideas here. I need to mention, that I mistakenly upgraded directly from Debian 5 to Debian 7 which was a big pain and caused a lot of trouble. This current problem is part of it and there might be weird causes involved, such as depreciated config entries or whatever.
推荐答案
首先,什么是PHP的版本?
First of all, what is the version of PHP?
如果其他的.php脚本除了phpMyAdmin的工作,为pretty安全承担的东西是错误与phpMyAdmin安装。 (或者与文件或虚拟主机)
If other .php scripts work except for phpMyAdmin, the is pretty safe to assume something is wrong with phpMyAdmin installation. (either with the files or the Virtual Host)
疑难解答:
-
可以运行在phpMyAdmin目录另一个脚本?与含的phpinfo文件尝试();如果不工作,那么问题是在你的Apache配置。
Can you run another script in phpMyAdmin directory? Try with a file containing phpinfo(); If it does not work then the problem is in your apache configuration.
如果上述属实,那么解析器是不承认的phpMyAdmin / index.php文件作为一个php文件,因为某些原因。请尝试重新安装phpMyAdmin的。
If the above is true, then the parser is not recognising phpMyAdmin/index.php as a php file, for some reason. Try reinstalling phpMyAdmin.
的思考:
删除将AddType应用/ X的httpd - PHP的.php
。你不应该需要它。
Remove AddType application/x-httpd-php .php
. You should not need it.
在PHP 5.4的 magic_quotes_gpc的
的被删除。如果你正在运行PHP5,删除了这一行。
In PHP 5.4 magic_quotes_gpc
was removed. If you're running PHP5, remove that line.
由于PHP 4.0.3,的 track_vars
的始终是打开的,因此也将其删除。
As of PHP 4.0.3, track_vars
is always turned on, so remove it also.
从PHP 4.2.0开始, 的register_globals
的本选项默认为关闭。在PHP5.3的 的register_globals
的是德precated,因为PHP5.4中的 的register_globals
的被删除。因此,如果运行PHP> 4.2.0删除了这一行。
As of PHP 4.2.0, register_globals
this directive defaults to off. In PHP5.3 register_globals
is deprecated, as of PHP5.4 register_globals
was removed. SO if running PHP > 4.2.0 remove that line.
这篇关于phpMyAdmin的PHP的不执行,但其他的PHP脚本工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!