You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Yates <jy...@dataservice.org> on 2002/06/03 21:40:50 UTC

Re: another problem with CGI

Without seeing the script, I guess either the shebang on top isn't there
or isn't set correctly.  Make sure it reads, 

#!/usr/bin/perl

It's probably trying to goto /usr/local/bin/perl.

-Jason

On Tue, 2002-06-04 at 01:32, Lior Hammer wrote:
> Hello,
> i have another strage problem with CGI.
> i downloaded Ikonboard,YaBB, and other Perl scripts...
> the first line is ok (#!/usr/bin/perl).
> The script have execute+read permissions to all users. (chmod 755 YaBB.cgi)
> but when i surf to this script i'm getting an "Internal Server Error" page.
> when i'm running it manually (./YaBB.cgi) i'm getting this error: "bash:
> ./YaBB.cgi: bad interpreter: No such file or directory"
> it's working only when i'm adding another file with the content:
> "#!/usr/bin/perl
> 
> require "YaBB.cgi"; "
> what is the problem could be?
> 
> 10Q
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Lior Hammer <li...@lior.ath.cx>.
Yes
----- Original Message -----
From: "Jason Yates" <jy...@dataservice.org>
To: <us...@httpd.apache.org>
Sent: Monday, June 03, 2002 2:20 PM
Subject: Re: another problem with CGI


> Thats really weird then.  It defiantely isn't an apache problem.  If you
> run the program like this 'perl yabb.cgi' does it work?
>
> -Jason
>
> On Tue, 2002-06-04 at 02:12, Lior Hammer wrote:
> > i checked it, it's pointing to #!/usr/bin/perl
> >
> > ----- Original Message -----
> > From: "Jason Yates" <jy...@dataservice.org>
> > To: <us...@httpd.apache.org>
> > Sent: Monday, June 03, 2002 12:40 PM
> > Subject: Re: another problem with CGI
> >
> >
> > > Without seeing the script, I guess either the shebang on top isn't
there
> > > or isn't set correctly.  Make sure it reads,
> > >
> > > #!/usr/bin/perl
> > >
> > > It's probably trying to goto /usr/local/bin/perl.
> > >
> > > -Jason
> > >
> > > On Tue, 2002-06-04 at 01:32, Lior Hammer wrote:
> > > > Hello,
> > > > i have another strage problem with CGI.
> > > > i downloaded Ikonboard,YaBB, and other Perl scripts...
> > > > the first line is ok (#!/usr/bin/perl).
> > > > The script have execute+read permissions to all users. (chmod 755
> > YaBB.cgi)
> > > > but when i surf to this script i'm getting an "Internal Server
Error"
> > page.
> > > > when i'm running it manually (./YaBB.cgi) i'm getting this error:
"bash:
> > > > ./YaBB.cgi: bad interpreter: No such file or directory"
> > > > it's working only when i'm adding another file with the content:
> > > > "#!/usr/bin/perl
> > > >
> > > > require "YaBB.cgi"; "
> > > > what is the problem could be?
> > > >
> > > > 10Q
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Jason Yates <jy...@dataservice.org>.
Thats really weird then.  It defiantely isn't an apache problem.  If you
run the program like this 'perl yabb.cgi' does it work?

-Jason

On Tue, 2002-06-04 at 02:12, Lior Hammer wrote:
> i checked it, it's pointing to #!/usr/bin/perl
> 
> ----- Original Message -----
> From: "Jason Yates" <jy...@dataservice.org>
> To: <us...@httpd.apache.org>
> Sent: Monday, June 03, 2002 12:40 PM
> Subject: Re: another problem with CGI
> 
> 
> > Without seeing the script, I guess either the shebang on top isn't there
> > or isn't set correctly.  Make sure it reads,
> >
> > #!/usr/bin/perl
> >
> > It's probably trying to goto /usr/local/bin/perl.
> >
> > -Jason
> >
> > On Tue, 2002-06-04 at 01:32, Lior Hammer wrote:
> > > Hello,
> > > i have another strage problem with CGI.
> > > i downloaded Ikonboard,YaBB, and other Perl scripts...
> > > the first line is ok (#!/usr/bin/perl).
> > > The script have execute+read permissions to all users. (chmod 755
> YaBB.cgi)
> > > but when i surf to this script i'm getting an "Internal Server Error"
> page.
> > > when i'm running it manually (./YaBB.cgi) i'm getting this error: "bash:
> > > ./YaBB.cgi: bad interpreter: No such file or directory"
> > > it's working only when i'm adding another file with the content:
> > > "#!/usr/bin/perl
> > >
> > > require "YaBB.cgi"; "
> > > what is the problem could be?
> > >
> > > 10Q
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by BAO RuiXian <ba...@atbusiness.com>.
In unix, type

    tr -d "\015" <currentfile>newfile

Regards

Bao

Lior Hammer wrote:

> There is ^M at the end of all lines.
> what should i do?
> ----- Original Message -----
> From: "Joshua Slive" <jo...@slive.ca>
> To: <us...@httpd.apache.org>
> Sent: Monday, June 03, 2002 2:19 PM
> Subject: Re: another problem with CGI
>
> >
> > On Mon, 3 Jun 2002, Lior Hammer wrote:
> >
> > > i checked it, it's pointing to #!/usr/bin/perl
> >
> > Did you transfer this from a dos/windows system?  What does
> > cat -v cgi-script | more
> > look like?  If it has funky things (^M) on the end of the lines, you
> > corrupted your file in transport.
> >
> > Try deleting the top line entirely and typing it fresh.
> >
> > Joshua.
> >

--
BAO RuiXian, PROGRAMMER, Technologies Team,  Project Services Group
AtBusiness Communications Corp., Kaapeliaukio 1, FIN-00180 Helsinki
tel. +358-9-2311 6674, mob. +358-50-329 6275,  fax +358-9-2311 6601
http://www.atbusiness.com, email: bao.ruixian@atbusiness.com



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Ron Wingfield <dt...@ionet.net>.
Sorry, I had not considered the zip possibility.  It is OK to transfer zip's via ftp binary mode; however, once unpacked, transfer of a text file via ftp binary mode can corrupt the file with the peculiar ^M characters (I think it's a line-feed or carriage-return; regardless it is a single control character).  Once the file is unzip'ed, i.e., in normal text format, a ftp transfer in binary mode is dangerous.  I've been bitten more than once by the same scenario.
  ----- Original Message ----- 
  From: Lior Hammer 
  To: users@httpd.apache.org 
  Sent: Tuesday, June 04, 2002 11:02 AM
  Subject: Re: another problem with CGI


  Transfer the whole zip file in ASCII?


  ----- Original Message ----- 
  From: "Matus "fantomas" Uhlar" <uh...@fantomas.sk>
  To: <us...@httpd.apache.org>
  Sent: Monday, June 03, 2002 10:42 PM
  Subject: Re: another problem with CGI


  > -> There is ^M at the end of all lines.
  > -> what should i do?
  > 
  > fromdos "file"
  > 
  > next time transfer text files using "ASCII" transfer mode.
  > 
  > -> > On Mon, 3 Jun 2002, Lior Hammer wrote:
  > -> > 
  > -> > > i checked it, it's pointing to #!/usr/bin/perl
  > -> > 
  > -> > Did you transfer this from a dos/windows system?  What does
  > -> > cat -v cgi-script | more
  > -> > look like?  If it has funky things (^M) on the end of the lines, you
  > -> > corrupted your file in transport.
  > -> > 
  > -> > Try deleting the top line entirely and typing it fresh.
  > 
  > -- 
  >  Matus "fantomas" Uhlar, uhlar@fantomas.sk ; http://www.fantomas.sk/
  >  Warning: I don't wish to receive spam to this address.
  >  Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
  >  Despite the cost of living, have you noticed how popular it remains? 
  > 
  > ---------------------------------------------------------------------
  > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  > For additional commands, e-mail: users-help@httpd.apache.org
  > 


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Lior Hammer <li...@lior.ath.cx>.
Transfer the whole zip file in ASCII?


----- Original Message ----- 
From: "Matus "fantomas" Uhlar" <uh...@fantomas.sk>
To: <us...@httpd.apache.org>
Sent: Monday, June 03, 2002 10:42 PM
Subject: Re: another problem with CGI


> -> There is ^M at the end of all lines.
> -> what should i do?
> 
> fromdos "file"
> 
> next time transfer text files using "ASCII" transfer mode.
> 
> -> > On Mon, 3 Jun 2002, Lior Hammer wrote:
> -> > 
> -> > > i checked it, it's pointing to #!/usr/bin/perl
> -> > 
> -> > Did you transfer this from a dos/windows system?  What does
> -> > cat -v cgi-script | more
> -> > look like?  If it has funky things (^M) on the end of the lines, you
> -> > corrupted your file in transport.
> -> > 
> -> > Try deleting the top line entirely and typing it fresh.
> 
> -- 
>  Matus "fantomas" Uhlar, uhlar@fantomas.sk ; http://www.fantomas.sk/
>  Warning: I don't wish to receive spam to this address.
>  Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
>  Despite the cost of living, have you noticed how popular it remains? 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Ron Wingfield <dt...@ionet.net>.
Yes, you've got to remove the ^Ms from your document.  In the future, (assuming that when you are) using ftp tools such as WS-FTP, the default is usually for binary transfer, which you should to use for graphic images such as JPG, GIF, etc.; however, for your html text, be sure to specify ASCII x'fer!
  ----- Original Message ----- 
  From: Matus "fantomas" Uhlar 
  To: users@httpd.apache.org 
  Sent: Tuesday, June 04, 2002 12:42 AM
  Subject: Re: another problem with CGI


  -> There is ^M at the end of all lines.
  -> what should i do?

  fromdos "file"

  next time transfer text files using "ASCII" transfer mode.

  -> > On Mon, 3 Jun 2002, Lior Hammer wrote:
  -> > 
  -> > > i checked it, it's pointing to #!/usr/bin/perl
  -> > 
  -> > Did you transfer this from a dos/windows system?  What does
  -> > cat -v cgi-script | more
  -> > look like?  If it has funky things (^M) on the end of the lines, you
  -> > corrupted your file in transport.
  -> > 
  -> > Try deleting the top line entirely and typing it fresh.

  -- 
   Matus "fantomas" Uhlar, uhlar@fantomas.sk ; http://www.fantomas.sk/
   Warning: I don't wish to receive spam to this address.
   Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
   Despite the cost of living, have you noticed how popular it remains? 

  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by "Matus \"fantomas\" Uhlar" <uh...@fantomas.sk>.
-> There is ^M at the end of all lines.
-> what should i do?

fromdos "file"

next time transfer text files using "ASCII" transfer mode.

-> > On Mon, 3 Jun 2002, Lior Hammer wrote:
-> > 
-> > > i checked it, it's pointing to #!/usr/bin/perl
-> > 
-> > Did you transfer this from a dos/windows system?  What does
-> > cat -v cgi-script | more
-> > look like?  If it has funky things (^M) on the end of the lines, you
-> > corrupted your file in transport.
-> > 
-> > Try deleting the top line entirely and typing it fresh.

-- 
 Matus "fantomas" Uhlar, uhlar@fantomas.sk ; http://www.fantomas.sk/
 Warning: I don't wish to receive spam to this address.
 Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
 Despite the cost of living, have you noticed how popular it remains? 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Lior Hammer <li...@lior.ath.cx>.
There is ^M at the end of all lines.
what should i do?
----- Original Message ----- 
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>
Sent: Monday, June 03, 2002 2:19 PM
Subject: Re: another problem with CGI


> 
> On Mon, 3 Jun 2002, Lior Hammer wrote:
> 
> > i checked it, it's pointing to #!/usr/bin/perl
> 
> Did you transfer this from a dos/windows system?  What does
> cat -v cgi-script | more
> look like?  If it has funky things (^M) on the end of the lines, you
> corrupted your file in transport.
> 
> Try deleting the top line entirely and typing it fresh.
> 
> Joshua.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 3 Jun 2002, Lior Hammer wrote:

> i checked it, it's pointing to #!/usr/bin/perl

Did you transfer this from a dos/windows system?  What does
cat -v cgi-script | more
look like?  If it has funky things (^M) on the end of the lines, you
corrupted your file in transport.

Try deleting the top line entirely and typing it fresh.

Joshua.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: another problem with CGI

Posted by Lior Hammer <li...@lior.ath.cx>.
i checked it, it's pointing to #!/usr/bin/perl

----- Original Message -----
From: "Jason Yates" <jy...@dataservice.org>
To: <us...@httpd.apache.org>
Sent: Monday, June 03, 2002 12:40 PM
Subject: Re: another problem with CGI


> Without seeing the script, I guess either the shebang on top isn't there
> or isn't set correctly.  Make sure it reads,
>
> #!/usr/bin/perl
>
> It's probably trying to goto /usr/local/bin/perl.
>
> -Jason
>
> On Tue, 2002-06-04 at 01:32, Lior Hammer wrote:
> > Hello,
> > i have another strage problem with CGI.
> > i downloaded Ikonboard,YaBB, and other Perl scripts...
> > the first line is ok (#!/usr/bin/perl).
> > The script have execute+read permissions to all users. (chmod 755
YaBB.cgi)
> > but when i surf to this script i'm getting an "Internal Server Error"
page.
> > when i'm running it manually (./YaBB.cgi) i'm getting this error: "bash:
> > ./YaBB.cgi: bad interpreter: No such file or directory"
> > it's working only when i'm adding another file with the content:
> > "#!/usr/bin/perl
> >
> > require "YaBB.cgi"; "
> > what is the problem could be?
> >
> > 10Q
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org