|
500错误!!!
我用了几天找这个的解决办法,一直没有找到.哎,真的不得不发帖请教了.
要说明的几点:
1、按雷傲论坛的readme设置好了权限。
2、用CGI探针可以看到环境变量什么的,看起来一切正常。
3、用apt-get 安装的php4和apache2,perl是跟着OS系统一起装的。
debian:/etc/apache2/mods-enabled# ls
cgid.conf cgid.load cgi.load php4.conf php4.load
4、apahce2的cgi-bin相关设置
#apache2.conf
AddHandler cgi-script .cgi .pl
#/etc/apache2/sites-enabled/default
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
以下是我的cgi探针结果:
[code:1]DOCUMENT_ROOT="/var/www/"
GATEWAY_INTERFACE="CGI/1.1"
HTTP_ACCEPT="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1"
HTTP_ACCEPT_CHARSET="GB2312,utf-8;q=0.7,*;q=0.7"
HTTP_ACCEPT_ENCODING="gzip,deflate"
HTTP_ACCEPT_LANGUAGE="zh-cn,eu;q=0.5"
HTTP_CACHE_CONTROL="max-age=0"
HTTP_CONNECTION="keep-alive"
HTTP_COOKIE="template=classic; lng=en"
HTTP_HOST="test.mydomain.com"
HTTP_KEEP_ALIVE="300"
HTTP_USER_AGENT="Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.6) Gecko/20040531 Debian/1.6-7firefly"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
QUERY_STRING=""
REMOTE_ADDR="192.168.0.123"
REMOTE_PORT="33042"
REQUEST_METHOD="GET"
REQUEST_URI="/cgi-bin/test-cgi/test.cgi"
SCRIPT_FILENAME="/usr/lib/cgi-bin/test-cgi/test.cgi"
SCRIPT_NAME="/cgi-bin/test-cgi/test.cgi"
SERVER_ADDR="192.168.0.123"
SERVER_ADMIN="[email protected]"
SERVER_NAME="test.mydomain.com"
SERVER_PORT="80"
SERVER_PROTOCOL="HTTP/1.1"
SERVER_SIGNATURE="<address>Apache/2.0.49 (Debian GNU/Linux) PHP/4.3.4 Server at test.mydomain.com Port 80</address>\n"
SERVER_SOFTWARE="Apache/2.0.49 (Debian GNU/Linux) PHP/4.3.4"[/code:1] |
|