xdwjack
发表于 2003-5-31 00:48:22
我只有/var/www/下面有一个cgi-bin文件夹,而且文件夹是空的.
运行了source ,出来结果了,一大堆的东西,出来东西就说明是好的吧
Dragonfly
发表于 2003-5-31 01:30:49
put this perl code under that dir and chmod 755, try to access it from http//../cgi-bin/p.pl
if u can not or get 500 error, then u apache has problem.
what is u ip? can i access?
#!/usr/bin/perl
##
##printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
xdwjack
发表于 2003-5-31 08:00:11
我的ip 219.242.117.253
可以这样http://219.242.117.253/lxr/........
Dragonfly
发表于 2003-5-31 08:05:01
i can not reach, are u in cernet?
xdwjack
发表于 2003-5-31 08:16:35
是的,我在教育网,可能您确实访问不了.
是不是您可以找一个教育网的代理会好一些?
Dragonfly
发表于 2003-5-31 08:28:49
i already try a proxy. but still can not access it.
can u run that perl script?
xdwjack
发表于 2003-5-31 19:19:12
终于有了一点进步!
因为对整个过程的设置不完全理解,所以在照葫芦画瓢的时候就会出现很多差错,因为我是按照好多人的设置综合而成的,所以就出现了很多的岔子.
我修改了几个地方.
1) 将.htaccess文件改为可执行的模式
2)baseurl:http://219.242.117.253/lxr/改为
baseurl:http://219.242.117.253/lxr/http
3)将<Directory /var/www/html/lxr/http>
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
改为
<Directory /var/www/html/lxr/http>
Options All
AllowOverride All
</Directory>
现在敲入http://219.242.117.253/lxr/http/source时,出现如下
Linux Cross Reference
linux-2.4.20/
Version: ~ [ 2.4.20 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~
Name Size Last modified (GMT) Description
Folder linux-2.4.20/ 2003-05-29 14:23:50
File fileidx 692224 bytes 2003-05-31 10:08:07
File xref 59965440 bytes 2003-05-31 10:07:50
File xxx 0 bytes 2003-05-30 09:18:44
~ [ source navigation ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~
这大概应该是正常的结果了,但是我进入之后,在代码中点击链接的时候,出现
** Warning: Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/5.8.0/i686-linux/DB_File.pm line 259.
net_random
** Warning: Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/5.8.0/i686-linux/DB_File.pm line 259.
** Fatal: Could not open "/var/www/html/lxr/source/2.4.20/fileidx"
上面的net_random是程序中的链接
Dragonfly
发表于 2003-6-1 06:02:46
1) -rw-r--r-- 1 root root 74 May5 11:32 .htaccess, need not be executable, and in fact now body will execute it, apache only read it.
2) is needed, u donot do that before?
3) my lxr is exactly like what u changed, where u get the old text?:wink:
u fileidx file mode is wrong. should be rw-r-r, default is wrong i believe, rw---,
xdwjack
发表于 2003-6-1 12:18:50
3)我是看了jjww一开始的贴子这样做的.
现在终于可以了,太高兴了!
我修改了filedix的模式,这样就可以了.
太感谢大家了,这里给了我太多的信心!
谢谢!太高兴了!
Dragonfly
发表于 2003-6-1 21:44:43
welcome, can u write a post to summarize what u did to setup this lxr? to help more people, thx.
btw, a small question, from http://lxr.linux.no/source/ u can never see fileidx, xref, files. but from u system u can see them. how to hide them? check why u can hide the glimpse generated file and try if u have interest.
:wink:
Anomymous
发表于 2003-6-2 09:17:53
这是自然,我现在正在整理,过一段时间就贴上去。
Dragonfly
发表于 2003-6-2 09:20:56
thx :-D:-D:-D
Anomymous
发表于 2003-6-2 22:19:36
现在出现了一个现象:
** Warning: Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/5.8.0/i686-linux/DB_File.pm line 259.
_ASM_SYSTEM_H
** Warning: Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/5.8.0/i686-linux/DB_File.pm line 259.
Defined as a preprocessor macro in:
* include/asm-mips/system.h, line 17
* include/asm-mips64/system.h, line 11
Referenced (in 2 files total) in:
* include/asm-mips/system.h:
o line 16
o line 17
* include/asm-mips64/system.h:
o line 10
o line 11
虽然出现了警告,但是需要的结果都可以正常出来,不知道为什么
Dragonfly
发表于 2003-6-2 22:34:41
this warning is because in DB_File.pm, there is a variable uninitiaized. just ignore it. if u really want to remove it. i remeber these is a post on web about this. i froget the link. i am trying to modify this perl code, once i get it, i will post here.
Dragonfly
发表于 2003-6-3 02:28:46
finally i get this from web. modify you DB_File.pm around line 259.
------------------------------------
$arg = 0666 unless defined $arg ;
# make recno in Berkeley DB version 2 work like recno in version 1.
if ($db_version > 1 and defined $arg and $arg =~ /RECNO/ and
$arg and ! -e $arg) {
open(FH, ">$arg") or return undef ;
close FH ;
------------------------------------
add that $arg = 0666 unless defined $arg ; it is only a warning from perl -w.