Re: Error trying to Run Perl script on IIS Server 8.5
by Discipulus (Canon) on Oct 29, 2014 at 12:37 UTC
|
| [reply] [d/l] [select] |
|
Looks Like you were absolutely right, run the program on wamp, works perfectly fine!!!
| [reply] |
|
*edit*
Hi Disciplus,
can you reccomend a book or something for CGI programming on IIS ?
| [reply] |
|
| [reply] [d/l] |
|
|
|
Looks like you removed your post and repalced it with another, specifically you've changed the text posted in a node. Please don't do this, as you can see it renders responses to be out of context. See 'a few added points' in How do I post a question effectively?.
| [reply] |
|
|
Re: Error trying to Run Perl script on IIS Server 8.5
by marto (Cardinal) on Oct 29, 2014 at 12:16 UTC
|
Likely your IIS config is not complete, but you don't say what you've got setup already. Have you ensured that your handler for perl is setup correctly?
| [reply] |
|
this is the link i have followed, if this is what you are reffering to:
http://www.howtogeek.com/50479/how-to-install-perl-on-iis-7-for-windows-server-2008/
| [reply] |
|
I've no idea if you've completed this successfully, also you state you're running IIS 8.5, this guide is for IIS 7, if there are differences in the configuration you're not going to find them here. Have you looked at the actual IIS 8.5 documentation?
| [reply] |
Re: Error trying to Run Perl script on IIS Server 8.5
by poj (Abbot) on Oct 29, 2014 at 13:31 UTC
|
The executable line in the Script Map should have double quotes " around the first %s not 2 single quotes ''.
C:\Perl64\bin\perl.exe "%s" %s
poj | [reply] [d/l] [select] |
Re: Error trying to Run Perl script on IIS Server 8.5
by Anonymous Monk on Oct 30, 2014 at 00:04 UTC
|
| [reply] |
Re: Error trying to Run Perl script on IIS Server 8.5
by Anonymous Monk on Oct 02, 2015 at 10:16 UTC
|
Hi,
You have to specify : C:\Perl\bin\perl.exe %s %s
in the script mapping of IIS 8.5. So no double quotes anymore around the first s, otherwise you get "Invalid argument".
In older versions of IIS the double quotes were needed.
Best Regards, | [reply] |
Re: Error trying to Run Perl script on IIS Server 8.5
by perlron (Pilgrim) on Oct 29, 2014 at 12:01 UTC
|
| [reply] |
|
| [reply] |
|
Still the same error!!!!......!!! I have already tried this, here is the complete code which i tried
print "Content-type: text/html\n\n";
print "<html><head><title>Environment Dumper </title></head><body>";
print "<center><table border=1>";
foreach (sort keys %ENV) {
print "<tr><td>$_</td><td>$ENV{$_}</td></tr>"
}
print "</table></center></body></html>";
| [reply] [d/l] |
|
I assume this is your first CGI program.
1.Try to isolate the problem you are facing by removing the other html tags.
print "Content-type: text/html\n\n";
print "Hello World!\n";
2. Run the program from the command line and see if it works.
3. One common error is forgetting to make the file executable.
4. If you have a log file on your IIS you might find more info there.
5. Since you are returning the Content type as text/html , the headers will be properly constructed and sent back to the client by the webserver, provided, your exec Cgi environment is setup correctly. This means you dont have to write <html> </html>like tags for this.
6. If you suspect a problem with your IIS server setup place an ordinary HTML file in the root directory and see if it is accessible from the browser.
7. Also the first line of your OP code shows the path as #!/usr/bin/perl. I think would not readily compute under the windows IIS environment ?
The temporal difficulty with perl is u need to know C well to know its awesome.else u just keep *using* it and writing inefficient code
| [reply] [d/l] |
|
|
|
|
|
|