Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem getting Perl installed and running properly. 2

Status
Not open for further replies.

garymgordon

Programmer
Apr 5, 2000
307
US
Hi.

Here's my dilemma.

1) I am the web developer, not the admin, but I am trying to get information for the admin so they can properly setup Perl to run on a Windows NT server running IIS.

2) Perl is installed, but doesn't seem to be running properly (or at all).

3) Previously, the server had PerlIS installed and was runnning, but would only execute .pl scripts. (It didn't run .cgi scripts.)

4) Now that Perl 5.05 is installed on the server, things are a little wacko. Here's what I mean.

a) Perl scripts (that had the extension of .pl were running fine before - as in a counter script) are now not running correct.

b) Perl scripts that I load as .pl seem ok other times.

BUT ...................

c) .cgi scripts (when they are the exact same code as .pl scripts .. and they are simple "Hello World" examples that should just display to the screen .. are giving me an error of :

"The page cannot be displayed.

There is a problem with a program on the page you are trying to reach, and the page cannot be displayed. "

But the .pl version of the same exact script works. The .cgi script gives me this error.

I am trying to find out what the admin did wrong (if anything) in their set up of Perl on the Windows NT server that again is running IIS and ... previoulsy had PerlIS on the server. (I am also not sure if he "uninstalled" PerlIS and want to know if this needs to be "uninstalled" and if so, can it be uninstalled now that Perl 5.05 has been installed or does he have to go through the entire process again.

Please, if anyone can, give me a step by step set of recommendations as to what the admin should be doing to allow .pl and .cgi scripts to be executed from ANY FOLDER on the server (within the website) ... not just a cgi-bin.

Thanks,
Gary

Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
You need to register the extensions with IIS. This is done by opening the MMC for IIS and right-clicking on the correct server and selecting properties.

You then need to edit the master properties for the

Select Home Directory tag and click the configuration button.

You then need to add and extension and point it to the correct PERL ISAPI dll.

After you have added all the extension that you want to run with PERL then you need to stop and restart the server.

Hope this helps,

James :) James Culshaw
james@miniaturereview.co.uk
 
culshaja,

Thank you very much.

One other comment ..

I get an error that says:

"CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:


Can't open perl script "D:\Virtual": No such file or directory"


when I try to run any .cgi script.

Is this all part of the same thing??? I am presumming it is.

So, .. thanks for everything.

Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
No it's not. The error message
"The specified CGI application misbehaved by not returning a complete set of HTTP headers" means one of two things:

1. The CGI script had compilation error(s). Run the locally (ie not via a web browser) to find out what (syntax) errors are preventing the script from compiling.

2. The script had an execution error *before* you had printed the http header. My advice is to print "Content-type: Text/html\n\n"; as the first line when you are developing Perl scripts.

Hope this helps.

Rob W
 
Well, you ready for this .

The admin of the server had me trying to run the .cgi scripts from a VIRTUAL server location on the Windows NT server.

The virtual folder name was c:\Virtual www
And ... the problem was the space between the two words.

That was was giving the .cgi a problem. It wasn't able to read the folder name.

So, as soon as we tried running it from a location that did not have a space .. it worked.

Does that make sense??

haha

Gary

Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
Nope, it makes no sense as CGI scipts will run in folders with spaces in their names!

I suspect it was a different problem which was solved by moving folders. Without any further info I can only speculate, but I guess it was most likely to have been a permissions thing.

Glad to hear it's working now though.

Rob W (with a space in his name)
 
rewebb,

Thanks.

But that was the only thing different. Permissions were all the same from what I saw.

I appreciated your input.

:)
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
OK, but there is no problem with having a space in the foldername. To prove this (to myself!) I've just created a folder called "new folder" on drive D, created a virtual directory on the server called "a b" and put a "hello world" script in it. I set the permissions to "execute" (instead of simply "script" as this is a CGI script, not ASP) and it runs perfectly OK.

Rob W
 
Ok.

Thank you VERY much for clearing it up .. testing it out, etc.

Thanks!!

I'll tell them.

:)
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
Ok.

Thank you VERY much for clearing it up .. testing it out, etc.

Thanks!!

I'll tell them.

:)
Gary

PS: This was a .cgi script not a .pl right? Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
The extension is irrelevant - it simply tells IIS what to do with a file. Your web server is configured so that files with a .cgi extension are loaded into the Perl interperator, we have our configured so that .pl (and .plx) files are executed by Perl. It could as easily be configured to execute .xyz or .k9 files :)

Out of the box IIS is configured to send .htm .html .txt files, etc to the browser but files that are .asp are given to ASP.dll for processing. There is no default configuration for CGI files so you have to create one when you install Perl - hence some people use .cgi some .pl etc

Rob W
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top