[Bioperl-l] write_sequence cgi perl problem
Paulo Almeida
paulo.david at netvisao.pt
Thu May 20 08:27:38 EDT 2004
It works for me. Maybe it was a temporary connection problem, since
error_log was giving you that "Bad hostname" error? Also, I think you
need to write a header for the CGI to work (I get a "Premature end of
script headers" if I don't), but that's a different issue.
-Paulo Almeida
Baranidharan P wrote:
>
>Dear all,
>
>The following perl script works fine from the command line....
>___________________________________________
>use Bio::Perl;
>
># this script will only work with an internet connection
># on the computer it is run on
>$seq_object = get_sequence('genbank',"NM_173283");
>#print "$seq_object";
>write_sequence(">ILGF1.gb",'genbank',$seq_object);
>___________________________________________
>
>but the following cgi-perl script in /var/www/cgi-bin
>____________________________________________
>#!/usr/bin/perl -w
>
>use strict;
>use CGI::Carp qw(fatalsToBrowser);
>use CGI qw(:standard);
>use Bio::Perl;
>
># this script will only work with an internet connection on the computer it is run on
>my $seq_object = get_sequence('genbank',"NM_173283");
>write_sequence(">ILGF1.gb",'genbank',$seq_object);
>__________________________________________________
>
>returns an error in the browser as
>---------------------------------------------------
>You have a non object [] passed to write_sequence. It maybe that you want to use new_sequence to make this string into a sequence object? at /usr/lib/perl5/site_perl/5.8.1/Bio/Perl.pm line 283
>Bio::Perl::write_sequence('>ILGF1.gb','genbank','undef') called at /var/www/cgi-bin/getgenseq.cgi line 12
>----------------------------------------------------
>
>and the /etc/httpd/logs/error_log file says
>---------------------------------------------------
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: , referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: ------------- EXCEPTION -------------, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: MSG: WebDBSeqI Request Error:, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: 500 (Internal Server Error) Can't connect to www.ebi.ac.uk:80 (Bad hostname 'www.ebi.ac.uk'), referer: http://10.22.32.3/ge
>tgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: Content-Type:
>text/plain, referer: http://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: Client-Date:
>Tue, 11 May 2004 04:23:36 GMT, referer: http://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: Client-Warnin
>g: Internal response, referer: http://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: , referer: ht
>tp://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: 500 Can't con
>nect to www.ebi.ac.uk:80 (Bad hostname 'www.ebi.ac.uk'), referer: http://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: , referer: ht
>tp://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: , referer: ht
>tp://10.22.32.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK Bio::DB
>::WebDBSeqI::_stream_request /usr/lib/perl5/site_perl/5.8.1/Bio/DB/WebDBSeqI.pm:728, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK Bio::DB::WebDBSeqI::get_seq_stream /usr/lib/perl5/site_perl/5.8.1/Bio/DB/WebDBSeqI.pm:460, referer: http://10.22.32.3
>/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK Bio::DB
>::RefSeq::get_seq_stream /usr/lib/perl5/site_perl/5.8.1/Bio/DB/RefSeq.pm:155, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK Bio::DB::WebDBSeqI::get_Stream_by_acc /usr/lib/perl5/site_perl/5.8.1/Bio/DB/WebDBSeqI.pm:312, referer: http://10.22.3
>2.3/getgenseq.html [Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK Bio::DB
>::WebDBSeqI::get_Seq_by_acc /usr/lib/perl5/site_perl/5.8.1/Bio/DB/WebDBSeqI.pm:181, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK Bio::Perl::get_sequence /usr/lib/perl5/site_perl/5.8.1/Bio/Perl.pm:508, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: STACK toplevel /var/www/cgi-bin/getgenseq.cgi:10, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: , referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: --------------------------------------, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] , referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] -------------------- WARNING ---------------------, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] MSG: acc (NM_173283) does not exist, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] ---------------------------------------------------, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: Use of uninitialized value in length at /usr/lib/perl5/site_perl/5.8.1/Bio/Perl.pm line 271., referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.1/Bio/Perl.pm line 283., referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: You have a non object [] passed to write_sequence. It maybe that you want to use new_sequence to make this string into a sequence object? at /usr/lib/perl5/site_perl/5.8.1/Bio/Perl.pm line 283, referer: http://10.22.32.3/getgenseq.html
>[Tue May 11 09:53:36 2004] [error] [client 10.22.32.3] [Tue May 11 09:53:36 2004] getgenseq.cgi: Bio::Perl::write_sequence('>ILGF1.gb','genbank','undef') called at /var/www/cgi-bin/getgenseq.cgi line 12, referer: http://10.22.32.3/getgenseq.html
>
More information about the Bioperl-l
mailing list