RE: Cgi Win xp Perl
Correction inline > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:02 PM > To: Perl > Subject: Cgi Win xp Perl > > > I am running on a windows xp pro desktop with iis installed. > I have active state Perl installed and have been using it > with out a problem. I just started to play with cgi and I am > having a lot of problems getting it to work right. I have a > static html form that's action calls the following script. > When it I hit submit all it does is display it as if it was a > text file. If I rename it to .pl then it tries to download > it. > However if I have just call another test cgi script that > displays some html then it runs fine (also named .pl) with > one exception it tells me that it is to late to do -T. > What I mean is if I run a cgi script that is not called from a form. Then it seem to run fine. But only if its name .pl. > So basically I need to find out how to call this script from > my form and have it execute. Second I need to find out how to > get .cgi scripts to load instead of displaying or trying to > download. Third I need to know how to pass the -t to the > compiler before my script executes. (I am assuming this is a > problem with Perl on windows not using the shebang. Even > though -w works odd.) > > #!/usr/bin/perl -w > use strict; > use CGI; > > my $q=new CGI; > print $q->header ("text/plain"); > print "These are the parameters I received:\n\n"; > > my ($name, $value); > foreach $name ($q->param){ > print "$name:\n"; > foreach $value ($q->param($name)){ > print "\t$value\n"; > } > } > > > Paul Kraus > Network Administrator > PEL Supply Company > 216.267.5775 Voice > 216-267-6176 Fax > www.pelsupply.com > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
Try putting the -T after the -w at the top of your perl script, make sure that your script ends in .cgi and your iis is setup to run scripts and change print $q->header ("text/plain"); to print $q->header ("text/html"); -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 3:02 PM To: Perl Subject: Cgi Win xp Perl I am running on a windows xp pro desktop with iis installed. I have active state Perl installed and have been using it with out a problem. I just started to play with cgi and I am having a lot of problems getting it to work right. I have a static html form that's action calls the following script. When it I hit submit all it does is display it as if it was a text file. If I rename it to .pl then it tries to download it. However if I have just call another test cgi script that displays some html then it runs fine (also named .pl) with one exception it tells me that it is to late to do -T. So basically I need to find out how to call this script from my form and have it execute. Second I need to find out how to get .cgi scripts to load instead of displaying or trying to download. Third I need to know how to pass the -t to the compiler before my script executes. (I am assuming this is a problem with Perl on windows not using the shebang. Even though -w works odd.) #!/usr/bin/perl -w use strict; use CGI; my $q=new CGI; print $q->header ("text/plain"); print "These are the parameters I received:\n\n"; my ($name, $value); foreach $name ($q->param){ print "$name:\n"; foreach $value ($q->param($name)){ print "\t$value\n"; } } Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
It still just displays the contents of my script rather then running it. Do I need to some how associate .cgi with Perl? > -Original Message- > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:12 PM > To: 'Paul Kraus'; Perl > Subject: RE: Cgi Win xp Perl > > > Try putting the -T after the -w at the top of your perl > script, make sure that your script ends in .cgi and your iis > is setup to run scripts and change > > print $q->header ("text/plain"); > > to > > print $q->header ("text/html"); > > > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:02 PM > To: Perl > Subject: Cgi Win xp Perl > > > I am running on a windows xp pro desktop with iis installed. > I have active state Perl installed and have been using it > with out a problem. I just started to play with cgi and I am > having a lot of problems getting it to work right. I have a > static html form that's action calls the following script. > When it I hit submit all it does is display it as if it was a > text file. If I rename it to .pl then it tries to download > it. However if I have just call another test cgi script that > displays some html then it runs fine (also named .pl) with > one exception it tells me that it is to late to do -T. > > So basically I need to find out how to call this script from > my form and have it execute. Second I need to find out how to > get .cgi scripts to load instead of displaying or trying to > download. Third I need to know how to pass the -t to the > compiler before my script executes. (I am assuming this is a > problem with Perl on windows not using the shebang. Even > though -w works odd.) > > #!/usr/bin/perl -w > use strict; > use CGI; > > my $q=new CGI; > print $q->header ("text/plain"); > print "These are the parameters I received:\n\n"; > > my ($name, $value); > foreach $name ($q->param){ > print "$name:\n"; > foreach $value ($q->param($name)){ > print "\t$value\n"; > } > } > > > Paul Kraus > Network Administrator > PEL Supply Company > 216.267.5775 Voice > 216-267-6176 Fax > www.pelsupply.com > > > -- > -- > > The views and opinions expressed in this email message are > the sender's own, and do not necessarily represent the views > and opinions of Summit Systems Inc. > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
Paul Kraus wrote: > It still just displays the contents of my script rather then running it. > have you try the '?' trick? if no, try something like: http://your.server/your.cgi-bin/your_script.pl?whatever the '?whatever' portion might give enough a hint to IIS that the request is a CGI request. if that works, you can do the same thing with the form stuff. of course, it's better to actually fix IIS then going around the problem. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
same issues. If it's a pl file it tries to download. If its .cgi then it just displays my code. > -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 4:39 PM > To: [EMAIL PROTECTED] > Subject: RE: Cgi Win xp Perl > > > Paul Kraus wrote: > > > It still just displays the contents of my script rather > then running > > it. > > > > have you try the '?' trick? if no, try something like: > http://your.server/your.cgi-bin/your_script.pl?whatever the '?whatever' portion might give enough a hint to IIS that the request is a CGI request. if that works, you can do the same thing with the form stuff. of course, it's better to actually fix IIS then going around the problem. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
I think I had to compile apahe for use with perl. I think in iis you need to specify how to deal with perl and cgi. Been a long time since I used iis. -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 3:20 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Cgi Win xp Perl same issues. If it's a pl file it tries to download. If its .cgi then it just displays my code. > -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 4:39 PM > To: [EMAIL PROTECTED] > Subject: RE: Cgi Win xp Perl > > > Paul Kraus wrote: > > > It still just displays the contents of my script rather > then running > > it. > > > > have you try the '?' trick? if no, try something like: > http://your.server/your.cgi-bin/your_script.pl?whatever the '?whatever' portion might give enough a hint to IIS that the request is a CGI request. if that works, you can do the same thing with the form stuff. of course, it's better to actually fix IIS then going around the problem. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
Paul Kraus wrote: > same issues. If it's a pl file it tries to download. If its .cgi then it > just displays my code. > what happen if you type your cgi_script.pl in the DOS prompt? does Windos complain about not able to execute the script? if so, Windos(as well as IIS) probably doesn't know how to execute your *.pl file. you probably have to associate *.pl with your Perl binary. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
nope that's the stumper. I use Perl all the time for business and just to play around I wanted to mess with cgi. The non cgi stuff works fine. Actually I can ran the cgi stuff from the command line just fine to. > -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 4:49 PM > To: [EMAIL PROTECTED] > Subject: RE: Cgi Win xp Perl > > > Paul Kraus wrote: > > > same issues. If it's a pl file it tries to download. If its > .cgi then > > it just displays my code. > > > > what happen if you type your cgi_script.pl in the DOS prompt? > does Windos > complain about not able to execute the script? if so, > Windos(as well as > IIS) probably doesn't know how to execute your *.pl file. you > probably have > to associate *.pl with your Perl binary. > > david > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
Paul Kraus wrote: > nope that's the stumper. I use Perl all the time for business and just > to play around I wanted to mess with cgi. The non cgi stuff works fine. > Actually I can ran the cgi stuff from the command line just fine to. let me get that straight: if the script has a .pl extension, your browser tries to download it even with the '?whatever' portion append at the end if the script has a .cgi extension, the source code of the script is displayed even with the '?whatever' portion append at the end if you run your scripts in a DOS windows with just its name like: c:\whatever>your_script.pl or: c:\whatever>your_script.cgi both runs fine. correct? david > >> -Original Message- >> From: david [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, January 07, 2003 4:49 PM >> To: [EMAIL PROTECTED] >> Subject: RE: Cgi Win xp Perl >> >> >> Paul Kraus wrote: >> >> > same issues. If it's a pl file it tries to download. If its >> .cgi then >> > it just displays my code. >> > >> >> what happen if you type your cgi_script.pl in the DOS prompt? >> does Windos >> complain about not able to execute the script? if so, >> Windos(as well as >> IIS) probably doesn't know how to execute your *.pl file. you >> probably have >> to associate *.pl with your Perl binary. >> >> david >> >> -- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cgi Win xp Perl
Do you have method=POST in the action call? Without that, many web servers will assume GET. Joseph Paul Kraus wrote: > It still just displays the contents of my script rather then running it. > > Do I need to some how associate .cgi with Perl? > > > -Original Message- > > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 3:12 PM > > To: 'Paul Kraus'; Perl > > Subject: RE: Cgi Win xp Perl > > > > > > Try putting the -T after the -w at the top of your perl > > script, make sure that your script ends in .cgi and your iis > > is setup to run scripts and change > > > > print $q->header ("text/plain"); > > > > to > > > > print $q->header ("text/html"); > > > > > > -Original Message- > > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 3:02 PM > > To: Perl > > Subject: Cgi Win xp Perl > > > > > > I am running on a windows xp pro desktop with iis installed. > > I have active state Perl installed and have been using it > > with out a problem. I just started to play with cgi and I am > > having a lot of problems getting it to work right. I have a > > static html form that's action calls the following script. > > When it I hit submit all it does is display it as if it was a > > text file. If I rename it to .pl then it tries to download > > it. However if I have just call another test cgi script that > > displays some html then it runs fine (also named .pl) with > > one exception it tells me that it is to late to do -T. > > > > So basically I need to find out how to call this script from > > my form and have it execute. Second I need to find out how to > > get .cgi scripts to load instead of displaying or trying to > > download. Third I need to know how to pass the -t to the > > compiler before my script executes. (I am assuming this is a > > problem with Perl on windows not using the shebang. Even > > though -w works odd.) > > > > #!/usr/bin/perl -w > > use strict; > > use CGI; > > > > my $q=new CGI; > > print $q->header ("text/plain"); > > print "These are the parameters I received:\n\n"; > > > > my ($name, $value); > > foreach $name ($q->param){ > > print "$name:\n"; > > foreach $value ($q->param($name)){ > > print "\t$value\n"; > > } > > } > > > > > > Paul Kraus > > Network Administrator > > PEL Supply Company > > 216.267.5775 Voice > > 216-267-6176 Fax > > www.pelsupply.com > > > > > > -- > > -- > > > > The views and opinions expressed in this email message are > > the sender's own, and do not necessarily represent the views > > and opinions of Summit Systems Inc. > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cgi Win xp Perl
Hi Ken, The ActiveState installation on Windows totally ignores the Unix command, treeating it as a comment. Joseph Ken Lehman wrote: > Is this path right? This looks like a unix path and your trying this on > windows right? > > #!/usr/bin/perl -w > > Anyway I setup my XP box to run perl, I am sorry to say I forget exactly > what I did but I know I had to set something up in IIS settings. > Sorry, you might get faster help from the cgi mailing list. > -Ken > > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:11 PM > To: 'Ken Lehman'; 'Perl' > Subject: RE: Cgi Win xp Perl > > It still just displays the contents of my script rather then running it. > > Do I need to some how associate .cgi with Perl? > > > -Original Message- > > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 3:12 PM > > To: 'Paul Kraus'; Perl > > Subject: RE: Cgi Win xp Perl > > > > > > Try putting the -T after the -w at the top of your perl > > script, make sure that your script ends in .cgi and your iis > > is setup to run scripts and change > > > > print $q->header ("text/plain"); > > > > to > > > > print $q->header ("text/html"); > > > > > > -Original Message- > > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 3:02 PM > > To: Perl > > Subject: Cgi Win xp Perl > > > > > > I am running on a windows xp pro desktop with iis installed. > > I have active state Perl installed and have been using it > > with out a problem. I just started to play with cgi and I am > > having a lot of problems getting it to work right. I have a > > static html form that's action calls the following script. > > When it I hit submit all it does is display it as if it was a > > text file. If I rename it to .pl then it tries to download > > it. However if I have just call another test cgi script that > > displays some html then it runs fine (also named .pl) with > > one exception it tells me that it is to late to do -T. > > > > So basically I need to find out how to call this script from > > my form and have it execute. Second I need to find out how to > > get .cgi scripts to load instead of displaying or trying to > > download. Third I need to know how to pass the -t to the > > compiler before my script executes. (I am assuming this is a > > problem with Perl on windows not using the shebang. Even > > though -w works odd.) > > > > #!/usr/bin/perl -w > > use strict; > > use CGI; > > > > my $q=new CGI; > > print $q->header ("text/plain"); > > print "These are the parameters I received:\n\n"; > > > > my ($name, $value); > > foreach $name ($q->param){ > > print "$name:\n"; > > foreach $value ($q->param($name)){ > > print "\t$value\n"; > > } > > } > > > > > > Paul Kraus > > Network Administrator > > PEL Supply Company > > 216.267.5775 Voice > > 216-267-6176 Fax > > www.pelsupply.com > > > > > > -- > > -- > > > > The views and opinions expressed in this email message are > > the sender's own, and do not necessarily represent the views > > and opinions of Summit Systems Inc. > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > The views and opinions expressed in this email message are the sender's > own, and do not necessarily represent the views and opinions of Summit > Systems Inc. > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cgi Win xp Perl
Hi Paul, Did you set up IIS for the virtual directory? You need top add a virtual directory for each location you'll be serving these scripts up from. File-system opening will not work as it does with static HTML. 1. Create a virtual directory in IIS 2 Right-click on it, and choose properties 3. Click configure 4. Make sure that *.pl and *.cgi are listed as file types for the server to handle. The path to the executable should be followed by " %s %s", like: f:\Perl\bin\perl.exe %s %s 5. Hake sure All Verbs is selected 6. Use the http://localhost/path URL format to access your script Joseph Paul Kraus wrote: > nope that's the stumper. I use Perl all the time for business and just > to play around I wanted to mess with cgi. The non cgi stuff works fine. > Actually I can ran the cgi stuff from the command line just fine to. > > > -Original Message- > > From: david [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 4:49 PM > > To: [EMAIL PROTECTED] > > Subject: RE: Cgi Win xp Perl > > > > > > Paul Kraus wrote: > > > > > same issues. If it's a pl file it tries to download. If its > > .cgi then > > > it just displays my code. > > > > > > > what happen if you type your cgi_script.pl in the DOS prompt? > > does Windos > > complain about not able to execute the script? if so, > > Windos(as well as > > IIS) probably doesn't know how to execute your *.pl file. you > > probably have > > to associate *.pl with your Perl binary. > > > > david > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cgi Win xp Perl
R. Joseph Newton said: > The ActiveState installation on Windows totally ignores the Unix command, > treeating it as a comment. Are you sure about that? I would have expected it to parse and honour the switches, as happens for Unix, but since I don't use ActivePerl I may be mistaken. > Ken Lehman wrote: > >> Is this path right? This looks like a unix path and your trying this on >> windows right? >> > #!/usr/bin/perl -w -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
IN LINE. FYI there are two identical scripts. count.pl and count.cgi. > let me get that straight: > if the script has a .pl extension, your browser tries to > download it even > with the '?whatever' portion append at the end No. If enter the script into the browser window as follows then it runs. http://mymachine/test/cgi/count.pl If I enter the script into the browser window as follows then it displays my source. http://mymachine/test/cgi/count.cgi If I call the same script from a form with this command either with or without the ?whatever then it tries to download. form method="POST" name="Form 1" action="c:\inetpub\wwwroot\test\cgi\count.pl?whatever"> > if the script has a .cgi extension, the source code of the script is > displayed even with the '?whatever' portion append at the end Yes. If I call the script with this command with or without the ?whatever it simply displays my source code. form method="POST" name="Form 1" action="c:\inetpub\wwwroot\test\cgi\count.cgi?whatever"> > if you run your scripts in a DOS windows with just its name like: > c:\whatever>your_script.pl This runs the script just fine. > c:\whatever>your_script.cgi Does not run my script. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
yes I use post. > -Original Message- > From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 10:01 PM > To: Paul Kraus > Cc: 'Ken Lehman'; 'Perl' > Subject: Re: Cgi Win xp Perl > > > Do you have method=POST in the action call? Without that, > many web servers will assume GET. > > Joseph > > Paul Kraus wrote: > > > It still just displays the contents of my script rather > then running > > it. > > > > Do I need to some how associate .cgi with Perl? > > > > > -Original Message- > > > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 07, 2003 3:12 PM > > > To: 'Paul Kraus'; Perl > > > Subject: RE: Cgi Win xp Perl > > > > > > > > > Try putting the -T after the -w at the top of your perl > script, make > > > sure that your script ends in .cgi and your iis is setup to run > > > scripts and change > > > > > > print $q->header ("text/plain"); > > > > > > to > > > > > > print $q->header ("text/html"); > > > > > > > > > -Original Message- > > > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 07, 2003 3:02 PM > > > To: Perl > > > Subject: Cgi Win xp Perl > > > > > > > > > I am running on a windows xp pro desktop with iis > installed. I have > > > active state Perl installed and have been using it with out a > > > problem. I just started to play with cgi and I am having a lot of > > > problems getting it to work right. I have a static html > form that's > > > action calls the following script. When it I hit submit > all it does > > > is display it as if it was a text file. If I rename it to > .pl then > > > it tries to download it. However if I have just call another test > > > cgi script that displays some html then it runs fine (also named > > > .pl) with one exception it tells me that it is to late to do -T. > > > > > > So basically I need to find out how to call this script > from my form > > > and have it execute. Second I need to find out how to get .cgi > > > scripts to load instead of displaying or trying to > download. Third I > > > need to know how to pass the -t to the compiler before my script > > > executes. (I am assuming this is a problem with Perl on > windows not > > > using the shebang. Even though -w works odd.) > > > > > > #!/usr/bin/perl -w > > > use strict; > > > use CGI; > > > > > > my $q=new CGI; > > > print $q->header ("text/plain"); > > > print "These are the parameters I received:\n\n"; > > > > > > my ($name, $value); > > > foreach $name ($q->param){ > > > print "$name:\n"; > > > foreach $value ($q->param($name)){ > > > print "\t$value\n"; > > > } > > > } > > > > > > > > > Paul Kraus > > > Network Administrator > > > PEL Supply Company > > > 216.267.5775 Voice > > > 216-267-6176 Fax > > > www.pelsupply.com > > > > > > > > > -- > > > -- > > > > > > The views and opinions expressed in this email message are the > > > sender's own, and do not necessarily represent the views and > > > opinions of Summit Systems Inc. > > > > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
Ok following these instructions. Now if I call a script http://localhost/path/myscript.cgi||.pl It will run the script just likes it is supposed to. When I call the scripts from a form with this command. then the pl file tries to download and the cgi file still displays the source. Where getting closer :) FYI I tried directing this to the cgi list but its seems to be very low traffic. 4 messages in two days. > -Original Message- > From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 10:46 PM > To: Paul Kraus > Cc: [EMAIL PROTECTED]; Perl > Subject: Re: Cgi Win xp Perl > > > Hi Paul, > > Did you set up IIS for the virtual directory? You need top > add a virtual directory for each location you'll be serving > these scripts up from. File-system opening will not work as > it does with static HTML. 1. Create a virtual directory in > IIS 2 Right-click on it, and choose properties 3. Click > configure 4. Make sure that *.pl and *.cgi are listed as file > types for the server to handle. The path to the executable > should be followed by " %s %s", like: f:\Perl\bin\perl.exe %s > %s 5. Hake sure All Verbs is selected 6. Use the http://localhost/path URL format to access your script Joseph Paul Kraus wrote: > nope that's the stumper. I use Perl all the time for business and just > to play around I wanted to mess with cgi. The non cgi stuff works > fine. Actually I can ran the cgi stuff from the command line just fine > to. > > > -Original Message- > > From: david [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 4:49 PM > > To: [EMAIL PROTECTED] > > Subject: RE: Cgi Win xp Perl > > > > > > Paul Kraus wrote: > > > > > same issues. If it's a pl file it tries to download. If its > > .cgi then > > > it just displays my code. > > > > > > > what happen if you type your cgi_script.pl in the DOS prompt? does > > Windos complain about not able to execute the script? if so, > > Windos(as well as > > IIS) probably doesn't know how to execute your *.pl file. you > > probably have > > to associate *.pl with your Perl binary. > > > > david > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
I believe in the new example the browser is not passing the form to any server because it is not a relative path, nor does it begin with a protocol specifier, and it recognizes C: as something it can handle. Try specifying either a relative path or using a full URL with something like http://localhost/path/script.cgi or http://127.0.0.1/path/script.cgi. Yeh the CGI list is kinda slow for the last few. A lot of us are on both lists and saw the thread originally appeared on the main list. (That and I have no experience admining IIS ;-)) http://danconia.org On Wed, 8 Jan 2003 08:29:11 -0500, "Paul Kraus" <[EMAIL PROTECTED]> wrote: > Ok following these instructions. > > Now if I call a script http://localhost/path/myscript.cgi||.pl > It will run the script just likes it is supposed to. > > When I call the scripts from a form with this command. > action="c:\inetpub\wwwroot\test\cgi\count.cgi"> > then the pl file tries to download and the cgi file still displays the > source. > > Where getting closer :) > > FYI I tried directing this to the cgi list but its seems to be very low > traffic. 4 messages in two days. > > > -Original Message- > > From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 10:46 PM > > To: Paul Kraus > > Cc: [EMAIL PROTECTED]; Perl > > Subject: Re: Cgi Win xp Perl > > > > > > Hi Paul, > > > > Did you set up IIS for the virtual directory? You need top > > add a virtual directory for each location you'll be serving > > these scripts up from. File-system opening will not work as > > it does with static HTML. 1. Create a virtual directory in > > IIS 2 Right-click on it, and choose properties 3. Click > > configure 4. Make sure that *.pl and *.cgi are listed as file > > types for the server to handle. The path to the executable > > should be followed by " %s %s", like: f:\Perl\bin\perl.exe %s > > %s 5. Hake sure All Verbs is selected 6. Use the > http://localhost/path URL format to access your script > > Joseph > > > Paul Kraus wrote: > > > nope that's the stumper. I use Perl all the time for business and just > > > to play around I wanted to mess with cgi. The non cgi stuff works > > fine. Actually I can ran the cgi stuff from the command line just fine > > > to. > > > > > -Original Message- > > > From: david [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 07, 2003 4:49 PM > > > To: [EMAIL PROTECTED] > > > Subject: RE: Cgi Win xp Perl > > > > > > > > > Paul Kraus wrote: > > > > > > > same issues. If it's a pl file it tries to download. If its > > > .cgi then > > > > it just displays my code. > > > > > > > > > > what happen if you type your cgi_script.pl in the DOS prompt? does > > > Windos complain about not able to execute the script? if so, > > > Windos(as well as > > > IIS) probably doesn't know how to execute your *.pl file. you > > > probably have > > > to associate *.pl with your Perl binary. > > > > > > david > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
That was it!!! Thanks. I still get an error when trying to use the -wT Do I have to add them to the command line call in the virtual directory? Instead of %s %s do I need to have -w -T? Paul > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 08, 2003 8:42 AM > To: Paul Kraus > Cc: 'Perl' > Subject: RE: Cgi Win xp Perl > > > I believe in the new example the browser is not passing the > form to any server because it is not a relative path, nor > does it begin with a protocol specifier, and it recognizes C: > as something it can handle. Try specifying either a relative > path or using a full URL with something like > http://localhost/path/script.cgi or http://127.0.0.1/path/script.cgi. > > Yeh the CGI list is kinda slow for the last few. A lot of us > are on both lists and saw the thread originally appeared on > the main list. (That and I have no experience admining IIS ;-)) > > http://danconia.org > > > > On Wed, 8 Jan 2003 08:29:11 -0500, "Paul Kraus" > <[EMAIL PROTECTED]> wrote: > > > Ok following these instructions. > > > > Now if I call a script http://localhost/path/myscript.cgi||.pl > > It will run the script just likes it is supposed to. > > > > When I call the scripts from a form with this command. > > > action="c:\inetpub\wwwroot\test\cgi\count.cgi"> > > then the pl file tries to download and the cgi file still > displays the > > source. > > > > Where getting closer :) > > > > FYI I tried directing this to the cgi list but its seems to be very > > low traffic. 4 messages in two days. > > > > > -Original Message- > > > From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 07, 2003 10:46 PM > > > To: Paul Kraus > > > Cc: [EMAIL PROTECTED]; Perl > > > Subject: Re: Cgi Win xp Perl > > > > > > > > > Hi Paul, > > > > > > Did you set up IIS for the virtual directory? You need top > > > add a virtual directory for each location you'll be serving > > > these scripts up from. File-system opening will not work as > > > it does with static HTML. 1. Create a virtual directory in > > > IIS 2 Right-click on it, and choose properties 3. Click > > > configure 4. Make sure that *.pl and *.cgi are listed as file > > > types for the server to handle. The path to the executable > > > should be followed by " %s %s", like: f:\Perl\bin\perl.exe %s > > > %s 5. Hake sure All Verbs is selected 6. Use the > > http://localhost/path URL format to access your script > > > > Joseph > > > > > > Paul Kraus wrote: > > > > > nope that's the stumper. I use Perl all the time for business and > > > just > > > > > to play around I wanted to mess with cgi. The non cgi stuff works > > > fine. Actually I can ran the cgi stuff from the command > line just fine > > > > > to. > > > > > > > -Original Message- > > > > From: david [mailto:[EMAIL PROTECTED]] > > > > Sent: Tuesday, January 07, 2003 4:49 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: RE: Cgi Win xp Perl > > > > > > > > > > > > Paul Kraus wrote: > > > > > > > > > same issues. If it's a pl file it tries to download. If its > > > > .cgi then > > > > > it just displays my code. > > > > > > > > > > > > > what happen if you type your cgi_script.pl in the DOS > prompt? does > > > > Windos complain about not able to execute the script? if so, > > > > Windos(as well as > > > > IIS) probably doesn't know how to execute your *.pl file. you > > > > probably have > > > > to associate *.pl with your Perl binary. > > > > > > > > david > > > > > > > > -- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] For > > > > additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cgi Win xp Perl
Thanks, This demonstrates a very important point with CGI--whenever possible, one should use relative paths--and never use backslash-delimited paths in a URL, regardless of OS. Web servers will translate to the local delimiters transparently. Joseph [EMAIL PROTECTED] wrote: > I believe in the new example the browser is not passing the form to any server >because it is not a relative path, nor does it begin with a protocol specifier, and >it recognizes C: as something it can handle. Try specifying either a relative path >or using a full URL with something like http://localhost/path/script.cgi or >http://127.0.0.1/path/script.cgi. > > Yeh the CGI list is kinda slow for the last few. A lot of us are on both lists and >saw the thread originally appeared on the main list. (That and I have no experience >admining IIS ;-)) > > http://danconia.org > > > On Wed, 8 Jan 2003 08:29:11 -0500, "Paul Kraus" <[EMAIL PROTECTED]> wrote: > > > Ok following these instructions. > > > > Now if I call a script http://localhost/path/myscript.cgi||.pl > > It will run the script just likes it is supposed to. > > > > When I call the scripts from a form with this command. > > > action="c:\inetpub\wwwroot\test\cgi\count.cgi"> > > then the pl file tries to download and the cgi file still displays the > > source. > > > > Where getting closer :) > > > > FYI I tried directing this to the cgi list but its seems to be very low > > traffic. 4 messages in two days. > > > > > -Original Message----- > > > From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 07, 2003 10:46 PM > > > To: Paul Kraus > > > Cc: [EMAIL PROTECTED]; Perl > > > Subject: Re: Cgi Win xp Perl > > > > > > > > > Hi Paul, > > > > > > Did you set up IIS for the virtual directory? You need top > > > add a virtual directory for each location you'll be serving > > > these scripts up from. File-system opening will not work as > > > it does with static HTML. 1. Create a virtual directory in > > > IIS 2 Right-click on it, and choose properties 3. Click > > > configure 4. Make sure that *.pl and *.cgi are listed as file > > > types for the server to handle. The path to the executable > > > should be followed by " %s %s", like: f:\Perl\bin\perl.exe %s > > > %s 5. Hake sure All Verbs is selected 6. Use the > > http://localhost/path URL format to access your script > > > > Joseph > > > > > > Paul Kraus wrote: > > > > > nope that's the stumper. I use Perl all the time for business and just > > > > > to play around I wanted to mess with cgi. The non cgi stuff works > > > fine. Actually I can ran the cgi stuff from the command line just fine > > > > > to. > > > > > > > -Original Message- > > > > From: david [mailto:[EMAIL PROTECTED]] > > > > Sent: Tuesday, January 07, 2003 4:49 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: RE: Cgi Win xp Perl > > > > > > > > > > > > Paul Kraus wrote: > > > > > > > > > same issues. If it's a pl file it tries to download. If its > > > > .cgi then > > > > > it just displays my code. > > > > > > > > > > > > > what happen if you type your cgi_script.pl in the DOS prompt? does > > > > Windos complain about not able to execute the script? if so, > > > > Windos(as well as > > > > IIS) probably doesn't know how to execute your *.pl file. you > > > > probably have > > > > to associate *.pl with your Perl binary. > > > > > > > > david > > > > > > > > -- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
On Wed, 8 Jan 2003 08:41:06 -0500, "Paul Kraus" <[EMAIL PROTECTED]> wrote: > That was it!!! Thanks. > Glad to hear it. > I still get an error when trying to use the -wT > > Do I have to add them to the command line call in the virtual directory? > Instead of %s %s do I need to have -w -T? > I don't know specifically but it is definitely worth a try. I am not sure what the %s %s does (not familar with IIS sorry) but my guess is the -wT should probably go in between the perl.exe and the %s %s. In general %s is a string being passed to the executable, so it may be required, IIS may be passing something through in place of the %s's in which case you would still need them. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
Is this path right? This looks like a unix path and your trying this on windows right? > #!/usr/bin/perl -w Anyway I setup my XP box to run perl, I am sorry to say I forget exactly what I did but I know I had to set something up in IIS settings. Sorry, you might get faster help from the cgi mailing list. -Ken -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 3:11 PM To: 'Ken Lehman'; 'Perl' Subject: RE: Cgi Win xp Perl It still just displays the contents of my script rather then running it. Do I need to some how associate .cgi with Perl? > -Original Message- > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:12 PM > To: 'Paul Kraus'; Perl > Subject: RE: Cgi Win xp Perl > > > Try putting the -T after the -w at the top of your perl > script, make sure that your script ends in .cgi and your iis > is setup to run scripts and change > > print $q->header ("text/plain"); > > to > > print $q->header ("text/html"); > > > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:02 PM > To: Perl > Subject: Cgi Win xp Perl > > > I am running on a windows xp pro desktop with iis installed. > I have active state Perl installed and have been using it > with out a problem. I just started to play with cgi and I am > having a lot of problems getting it to work right. I have a > static html form that's action calls the following script. > When it I hit submit all it does is display it as if it was a > text file. If I rename it to .pl then it tries to download > it. However if I have just call another test cgi script that > displays some html then it runs fine (also named .pl) with > one exception it tells me that it is to late to do -T. > > So basically I need to find out how to call this script from > my form and have it execute. Second I need to find out how to > get .cgi scripts to load instead of displaying or trying to > download. Third I need to know how to pass the -t to the > compiler before my script executes. (I am assuming this is a > problem with Perl on windows not using the shebang. Even > though -w works odd.) > > #!/usr/bin/perl -w > use strict; > use CGI; > > my $q=new CGI; > print $q->header ("text/plain"); > print "These are the parameters I received:\n\n"; > > my ($name, $value); > foreach $name ($q->param){ > print "$name:\n"; > foreach $value ($q->param($name)){ > print "\t$value\n"; > } > } > > > Paul Kraus > Network Administrator > PEL Supply Company > 216.267.5775 Voice > 216-267-6176 Fax > www.pelsupply.com > > > -- > -- > > The views and opinions expressed in this email message are > the sender's own, and do not necessarily represent the views > and opinions of Summit Systems Inc. > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cgi Win xp Perl
NP Thanks anyways The cgi mailing list is where? > -Original Message- > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:30 PM > To: 'Paul Kraus'; 'Perl' > Subject: RE: Cgi Win xp Perl > > > Is this path right? This looks like a unix path and your > trying this on windows right? > > #!/usr/bin/perl -w > > Anyway I setup my XP box to run perl, I am sorry to say I > forget exactly what I did but I know I had to set something > up in IIS settings. > Sorry, you might get faster help from the cgi mailing list. -Ken > > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:11 PM > To: 'Ken Lehman'; 'Perl' > Subject: RE: Cgi Win xp Perl > > > It still just displays the contents of my script rather then > running it. > > Do I need to some how associate .cgi with Perl? > > > -Original Message- > > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 3:12 PM > > To: 'Paul Kraus'; Perl > > Subject: RE: Cgi Win xp Perl > > > > > > Try putting the -T after the -w at the top of your perl > > script, make sure that your script ends in .cgi and your iis > > is setup to run scripts and change > > > > print $q->header ("text/plain"); > > > > to > > > > print $q->header ("text/html"); > > > > > > -Original Message- > > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 07, 2003 3:02 PM > > To: Perl > > Subject: Cgi Win xp Perl > > > > > > I am running on a windows xp pro desktop with iis installed. > > I have active state Perl installed and have been using it > > with out a problem. I just started to play with cgi and I am > > having a lot of problems getting it to work right. I have a > > static html form that's action calls the following script. > > When it I hit submit all it does is display it as if it was a > > text file. If I rename it to .pl then it tries to download > > it. However if I have just call another test cgi script that > > displays some html then it runs fine (also named .pl) with > > one exception it tells me that it is to late to do -T. > > > > So basically I need to find out how to call this script from > > my form and have it execute. Second I need to find out how to > > get .cgi scripts to load instead of displaying or trying to > > download. Third I need to know how to pass the -t to the > > compiler before my script executes. (I am assuming this is a > > problem with Perl on windows not using the shebang. Even > > though -w works odd.) > > > > #!/usr/bin/perl -w > > use strict; > > use CGI; > > > > my $q=new CGI; > > print $q->header ("text/plain"); > > print "These are the parameters I received:\n\n"; > > > > my ($name, $value); > > foreach $name ($q->param){ > > print "$name:\n"; > > foreach $value ($q->param($name)){ > > print "\t$value\n"; > > } > > } > > > > > > Paul Kraus > > Network Administrator > > PEL Supply Company > > 216.267.5775 Voice > > 216-267-6176 Fax > > www.pelsupply.com > > > > > > -- > > -- > > > > The views and opinions expressed in this email message are > > the sender's own, and do not necessarily represent the views > > and opinions of Summit Systems Inc. > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > -- > > The views and opinions expressed in this email message are > the sender's > own, and do not necessarily represent the views and opinions of Summit > Systems Inc. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]