Solved

Can't open perl script: ????????? Invalid argument

Posted on 1998-08-25
5
2,405 Views
Last Modified: 2011-09-20
when i try to execute a perl script on iis4.0 and NT4.0 ws i get the following answer:

Can't open perl script: ????????? Invalid argument

What am i doing wrong?

When i execute a perl scrip direct from the commandline everything works fine!

Thanx in advance.
0
Comment
Question by:thommy1
  • 3
  • 2
5 Comments
 

Expert Comment

by:gre
Comment Utility
give some more info about the script.
are you passing it arguments?
are the file permissions set correctly?
do you have IIS map the .pl extension?
0
 

Author Comment

by:thommy1
Comment Utility
The script is the example from Microsofts Knowledge Base:

print "HTTP/1.0 200 OK\n"; print "Content-Type: text/html\n\n";

print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>Hello World</TITLE>\n"; print "</HEAD>\n"; print "<BODY>\n"; print "<H4>Hello World</H4>\n"; print "<P>\n"; print "Your IP Address is $ENV{REMOTE_ADDR}.\n"; print "<P>"; print "<H5>Have a nice day</H5>\n"; print "</BODY>\n"; print "</HTML>\n";

i have maped HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ services\W3SVC\Parameters\ScriptMap

permissions are set for the complete directory.

0
 

Expert Comment

by:gre
Comment Utility
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
 

Author Comment

by:thommy1
Comment Utility
Yes, now it works fine!

I've got the newest release from ActiveState Perl, and there the IIS is configured automatically.

It has done exactly the same changes as you told me.

Thanks again.
0
 

Accepted Solution

by:
gre earned 10 total points
Comment Utility
Glad to hear it's all working now.
I just got IIS myself a couple days ago and am now having problem with SSI's.

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
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.…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

10 Experts available now in Live!

Get 1:1 Help Now