Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ActivePerl Problem

1 view
Skip to first unread message

alazar...@my-deja.com

unread,
Dec 7, 2000, 3:00:00 AM12/7/00
to
I've installed ActivePerl 5.6.0.620 on my windows NT. I can run my file
(blah.cgi) from the command line and it works perfectly, spits out the
html taged code with no errors. However, when I try to run that same
script from an HTML form (action="blah.cgi") it doesn't work. All I get
is the .cgi file literally printed into my browser.

I have the exact same files running and working on a unix server, so I
think the error is not in my code.

I suspect the problem is in the first line of the .cgi file:
#!/usr/local/bin/perl

That line is needed for the unix server, but should it be changed for
ActivePerl on a WinNT system?

Any ideas?

Thanks in advance,

Alex Lazarevich
alaz...@itg.uiuc.edu


Sent via Deja.com http://www.deja.com/
Before you buy.

matteo

unread,
Dec 8, 2000, 7:53:38 AM12/8/00
to
**** Post for FREE via your newsreader at post.usenet.com ****

install apache from apache.org
<alazar...@my-deja.com> ha scritto nel messaggio
news:90p262$6ae$1...@nnrp1.deja.com...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Garry Williams

unread,
Dec 8, 2000, 8:24:50 AM12/8/00
to
On 8 Dec 2000 06:21:45 GMT, Homer Simpson <homer....@springfield.nul> wrote:

>In article <90p262$6ae$1...@nnrp1.deja.com>, alazar...@my-deja.com wrote:
>>
>>I suspect the problem is in the first line of the .cgi file:
>>#!/usr/local/bin/perl
>>
>>That line is needed for the unix server, but should it be changed for
>>ActivePerl on a WinNT system?
>>
>lines with a # sign are comments.
>On Unix file systems setting the execute attribute on the file causes the
>shell to understand that the comment is the path to the interpreter.
^^^^^

See exec(2). "The shell" is _not_ involved.

--
Garry Williams

Dick Latshaw

unread,
Dec 8, 2000, 8:19:43 AM12/8/00
to
In article <90q1rh$u47$1...@nnrp1.deja.com>,

CM <cmon...@hotmail.com> wrote:
> > I suspect the problem is in the first line of the .cgi file:
> > #!/usr/local/bin/perl
> >
> > That line is needed for the unix server, but should it be changed
> > for ActivePerl on a WinNT system?
>
> You do not need the above lines for Perl on windows!

Unless of course you are part of that 60-70% of the universe that is
running Apache. In that case you need something like
#!d:/perl/bin/perl -Tw

--
Regards,
Dick

Joel Nelson

unread,
Dec 8, 2000, 5:37:52 PM12/8/00
to
Csaba Raduly wrote:

> A million monkeys weren't enough! It took Joel Nelson
> <joeln...@home.com> on 08 Dec 2000 to produce
> <3A307F69...@home.com>:


>
> >alazar...@my-deja.com wrote:
> >
> >> I've installed ActivePerl 5.6.0.620 on my windows NT. I can run my
> >> file (blah.cgi) from the command line and it works perfectly,
> >> spits out the html taged code with no errors. However, when I try
> >> to run that same script from an HTML form (action="blah.cgi") it
> >> doesn't work. All I get is the .cgi file literally printed into my
> >> browser.
> >

> >Your web server is misconfigured for running .cgi scripts.


> >
> >> I have the exact same files running and working on a unix server,
> >> so I think the error is not in my code.
> >

> >Quite possibly.


> >
> >> I suspect the problem is in the first line of the .cgi file:
> >> #!/usr/local/bin/perl
> >

> >Thats not the problem. However, when you get the web server
> >configured correctly you will get 'Internal Server Error' because
> >your shebang line '#!/usr/local/bin/perl' is indeed incorrect. It
> >should point to your perl executable something like
> >'#!d:\perl\bin\perl'. Note the slashes are windows style but just
> >for that line.
> >
>
> That should either be #!d:\\perl\\bin\\perl or, more simply (gram?)
> #!d:/perl/bin/perl
>
> *My* perl.exe is d:/usr/bin/perl.exe
>
> If you have perl.exe in the path, the simplest is #!perl (but that
> wouldn't work on Unix, which is the system where the #! (shebang) line
> really has a meaning.
>
> Of course, none of this is a solution to the original problem (probably
> a server misconfiguration)
>
> --
> Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
> mailto:csaba....@sophos.com http://www.sophos.com/
> US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
> ... you'll be the first against the -pedantic -Wall -W

Guess it's been several versions since I tried it but it appears now to
work like:
#!d:/perl/bin/perl
or
#!d:\perl\bin\perl
but internal server error on
#!d:\\perl\\bin\\perl

Hmmm.

0 new messages