Solved

IIS4.0, NT 4.0 Perl gone goofy on me...

Posted on 1998-09-10
4
205 Views
Last Modified: 2010-03-05
When running a simple perl script fromt he command line, such as;

print "My first Perl script\n";
print "hello";
exit 0;

it works fine.

When running a sample test script found here that combines an HTML and PL file that has a submit form button, when hitting the submit button I recieve a prompt to open from location or download. If I open from location I get a breif flash of the script in a command shell flying by on it's way to nowhere.

<HTML>
<BODY>
<FORM method=post ACTION="test.pl">
<INPUT type=text size=10>
<INPUT type=submit Value="Submit form">
</FORM>
</BODY>
</HTML>


and

print "Content-type: text/html\n\n";
print "hello\n";

exit 0;


I have a very important survey script I need to get up and running.....PLEASE HELP!!!!
The same thing happens with the important script (too long to show here, it asks to be downloaded or executed and then flashes by without displaying anything.Is smething wrong with my Perl installation, the permissions, the file associations?
0
Comment
Question by:aserapig
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Expert Comment

by:b2pi
ID: 1204815
Hmmm, taking a look at "The Idiot's Guide to Solving Perl CGI"...

( <href=http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>

could help here...



Where does the server expect to find CGI scripts?  Is your script
there?

Does the server expect that cgi scripts can be called .pl, or does it
insist on them being called .cgi?

How does the server know that the cgi script is a perl script (hint:
See the dos-level commands ftype and assoc)


0
 

Author Comment

by:aserapig
ID: 1204816
Have looked there and at ftp.ou.edu/mirrors/CPAN/doc/FAQs/nt/Perl_for_Win32_FAQ_4.html

Still have the problem that it just flys by in a command screen instead of bringing up anything in a browser to view.

From the above FAQ direction, I found PerlIS.dll and added as an ISAPI filter, except it will not load in IIS, I have the down red arrow and a failed to load message...is this a clue? or simply a red herring?
0
 

Author Comment

by:aserapig
ID: 1204817
Adjusted points to 40
0
 

Accepted Solution

by:
gre earned 40 total points
ID: 1204818
the problem is that your script is recognized  as a file and not as an executable script.

1.put the script in the 'scripts' folder under Inetpub folder.

2.put the html page in 'wwwroot' under Inetpub folder.

3. make sure the FIRST line of your script is: print "Content-type: text/html\n\n";

3. if it still does not work check this:

make sure your perl mapping is correct:

I would make sure that the directory is mapped to a .pl
( I am assuming this is a .pl script)
in IIS Service Manager highlight 'Default Web Site'
go to the 'Action' pull down menu and click on 'Properties'
then click on the tab that says 'Home Directory'
click the button towards the bottom right 'Configuration'
you will now see a list of extensions and thier exe path.
check to make sure the .pl extension is in there.
if not you can add it:

pl      c:\your path to Perl exe...\Perl.exe %s %s


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question