Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 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

12 Experts available now in Live!

Get 1:1 Help Now