QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: lihuabo

为什么这个版块没有介绍lxr的文章呢?

[复制链接]
发表于 2003-5-31 00:48:22 | 显示全部楼层
我只有/var/www/下面有一个cgi-bin文件夹,而且文件夹是空的.

运行了source ,出来结果了,一大堆的东西,出来东西就说明是好的吧
回复

使用道具 举报

发表于 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";
}
回复

使用道具 举报

发表于 2003-5-31 08:00:11 | 显示全部楼层
我的ip 219.242.117.253

可以这样http://219.242.117.253/lxr/........
回复

使用道具 举报

发表于 2003-5-31 08:05:01 | 显示全部楼层
i can not reach, are u in cernet?
回复

使用道具 举报

发表于 2003-5-31 08:16:35 | 显示全部楼层
是的,我在教育网,可能您确实访问不了.

是不是您可以找一个教育网的代理会好一些?
回复

使用道具 举报

发表于 2003-5-31 08:28:49 | 显示全部楼层
i already try a proxy. but still can not access it.

can u run that perl script?
回复

使用道具 举报

发表于 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是程序中的链接
回复

使用道具 举报

发表于 2003-6-1 06:02:46 | 显示全部楼层
1) -rw-r--r--    1 root     root           74 May  5 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?  

u fileidx file mode is wrong. should be rw-r-r, default is wrong i believe, rw---,
回复

使用道具 举报

发表于 2003-6-1 12:18:50 | 显示全部楼层
3)我是看了jjww一开始的贴子这样做的.

现在终于可以了,太高兴了!

我修改了filedix的模式,这样就可以了.

太感谢大家了,这里给了我太多的信心!

谢谢!太高兴了!
回复

使用道具 举报

发表于 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.

回复

使用道具 举报

发表于 2003-6-2 09:17:53 | 显示全部楼层
这是自然,我现在正在整理,过一段时间就贴上去。
回复

使用道具 举报

发表于 2003-6-2 09:20:56 | 显示全部楼层
thx     
回复

使用道具 举报

发表于 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

虽然出现了警告,但是需要的结果都可以正常出来,不知道为什么
回复

使用道具 举报

发表于 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.
回复

使用道具 举报

发表于 2003-6-3 02:28:46 | 显示全部楼层
finally i get this from web. modify you DB_File.pm around line 259.
------------------------------------
    $arg[3] = 0666 unless defined $arg[3] ;
    # make recno in Berkeley DB version 2 work like recno in version 1.
    if ($db_version > 1 and defined $arg[4] and $arg[4] =~ /RECNO/ and
        $arg[1] and ! -e $arg[1]) {
        open(FH, ">$arg[1]") or return undef ;
        close FH ;
------------------------------------
add that     $arg[3] = 0666 unless defined $arg[3] ; it is only a warning from perl -w.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-23 11:02 , Processed in 0.042743 second(s), 12 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表