Solved

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

Posted on 1998-09-10
4
200 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now