应该不是SElinux,此前我已经禁用了。 sestatus SELinux status: disabled
一松 2011/10/16 Anthony WU <[email protected]>: > 查看一下 SELinux ����吧,九成是 SELinux 的���},如果只是�_�l�h境你可以先 > ����直接�P掉 SELinux 然後再�� > > -------- Original Message -------- > Subject: Re: [PerlChina] system 调用外部命令无法执行 > From: Yisong Zhen <[email protected]> > To: [email protected] > Date: 15/10/2011 18:20 >> 谢谢x2x4和Robin。 >> >> 本地的程序可以调用了,但是客户端通过服务器调用system 无法实现。求解!!!! >> >> http://www.perlmonks.org/?node_id=34398 >> Calling a method inside CGI script using system calls >> >> 自己搜索了一下,问题别人提出来了,但是还是没有解决。 >> perl /var/www/cgi-bin/cardiophylo.pl >> $? 的返回值是"0",表明程序顺利执行。 >> >> 然而页面执行该CGI,$? 返回值是32512. >> >> 我都授权755. >> >> 我不知道自己讲清楚了没有。着急啊! >> >> 一松 >> >> >> 2011/10/15 Yisong Zhen <[email protected]>: >>> 改了,绝对路径也不行! >>> >>> 一松 >>> 2011/10/15 x2x4 <[email protected]>: >>>> 写绝对路径试试,一般我习惯 >>>> my @return=`systemcommand 2>&1;echo \$?` >>>> 然后判断$return[-1]是否为0,否则就吧数组return输出 >>>> >>>> 在 2011-10-15 上午11:29,"Yisong Zhen" <[email protected]>写道: >>>>> 没有什么额外的信息,只是说程序的第9行: >>>>> die cannot excute the proram: at temp.pl line 9. >>>>> >>>>> 一松 >>>>> >>>>> 2011/10/15 Robin Lee <[email protected]>: >>>>>> 改用 >>>>>> die "cannot excute the proram: $!" >>>>>> 看看有什么系统错误信息 >>>>>> >>>>>> 2011/10/15 Yisong Zhen <[email protected]>: >>>>>>> 诸位,一个小问题: >>>>>>> >>>>>>> 该脚本运行在Fedora15上面:但是无法执行system里面的程序。但是,程序不用借助perl外部调用可以正确执行。 >>>>>>> 即,我直接在linux命令行敲入:dialign2-2 -fn promoter.out -n promoter.seq >>>>>>> 可以执行程序。 >>>>>>> >>>>>>> 起初我觉得是路径不对,我输出了路径,发现是正确的,而且所需的DIALIGN2_DIR变量也设置正确。 >>>>>>> 代码如下: >>>>>>> >>>>>>> #!/usr/bin/perl >>>>>>> >>>>>>> #my $dir = $ENV{'DIALIGN2_DIR'}; >>>>>>> #my $path = $ENV{'PATH'}; >>>>>>> >>>>>>> >>>>>>> my $commandLine = "dialign2-2 -fn promoter.out -n promoter.seq"; >>>>>>> my $returnValue = system($commandLine) || die "cannot excute the >>>>>>> proram"; >>>>>>> >>>>>>> 非常感谢能有人出手帮助。 >>>>>>> >>>>>>> 甄一松 >>>>> -- > > -- > 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 > 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 > > -- //--------------------------------------------------------------------------------------- // We have a hunger of the mind which asks for knowledge // of all around us, and the more we gain, the more is // our desire; the more we see, the more we are capable // of seeing. //--------------------------------------------------------------------------------------- @ YiSong Zhen, Ph.D State Key Laboratory of Translational Cardiovascular Medicine, Fuwai Hospital & Cardiovascular Institute, Chinese Academy of Medical Sciences, Peking Union Medical College, Beijing 100037, Beilishilu 167 P.R.China http://www.cardiosignal.org Tel: 13683138526 (mobile) @---------------------------------------------------------------------------------------- -- 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
