oh btw, note that there might a reason for the path not being passed normally because it is not safe.
I am running a local blast program in apche2 server...but it showing me error that.
--------------------- WARNING ---------------------
MSG: cannot find path to blastall
---------------------------------------------------
My code is..
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use Bio::Perl;
use Bio::Tools::Run::StandAloneBlast;
@params = ('database' => 'btaudb','outfile' => 'bla.out',
'_READMETHOD' => 'Blast', 'prog'=> 'blastn');
$factory = Bio::Tools::Run::StandAloneBlast->new(@params);
$str = Bio::SeqIO->new(-file=>'test_query.fa' , '-format' => 'Fasta' );
$input = $str->next_seq();
$factory->blastall($input);
when i am running the same code in terminal its working fine...and showing mw correct result....pl help me..how to run local balst program in apche2 server.....
1 answer
Reason: the PATH variable is not passed on, so the perl program cannot find it. What you have to do depends on whether you are using mod-perl or not.
Read this and run the little cgi to see your environment. http://httpd.apache.org/docs/2.0/howto/cgi.html#env
Then RTFM: http://httpd.apache.org/docs/2.2/mod/mod_env.html#passenv
Most likely, if the path is set correctly during server start, adding
PassEnv PATH
to your hhtpd.config will solve the problem. If you are using mod-perl use
PerlPassEnv PATH
in mod perl configuration section instead and rtfm: http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlPassEnv_
^^
Log in to answer this question.
Is your perl script in the same folder as blastall?
btw, this is slightly off-topic, even though it might not be obvious at first glance.