Web Hosting Talk







View Full Version : CGI (Perl) Issues


The Laughing Cow
12-27-2001, 03:08 PM
Hi, I seem to be having some problems with executing Perl. The server is Windows2000AdvServer. It was all working nicely then suddenly one day when i try to run a Perl script it just shows the coding :eek:

Take a look here.
http://www.mdnhw.co.uk/path.pl

That used to execute and show the path to that directory. Now it just shows coding. How should i go about trying to fix this problem? I believe the server runs ActivePerl for windows.

Thanks

Terry Jacobs

ToTheMax
12-27-2001, 10:44 PM
Isn't the first line of the script should be #!C:\Perl\bin\Perl.exe or something like that?

allan
12-27-2001, 11:04 PM
Originally posted by lwlim
Isn't the first line of the script should be #!C:\Perl\bin\Perl.exe or something like that?

Not necessarily. Windows processes perl files slightly differently than a *nix system. Instead of knowing where the path is, it makes a registry association, so that all files ending in .pl call the perl executable, wherever it is.

LC -- a couple of questions for you:

1. What web server are you running?
2. Does the root web directory have script permissions?
3. Check to see which version of Perl you are running (from a command line: perl.exe -v)
4. What was the last change you made before it stopped working?

It sounds like it may be either a registry error, or a permissions error, but I can't say for sure based on the information you provided.

Lawrence
12-28-2001, 04:57 AM
I'd say it's most likely that the directory the script is in doesn't have Script Executable permissions, or .pl isn't properly associated with the Perl interpreter.

The Laughing Cow
12-28-2001, 08:41 AM
Well after speaking to some others i work with i found out that someone had disabled perl to install perldesk so i shall await them to re-enable it.

thanks for the help guys tho!

The Laughing Cow
12-30-2001, 07:51 AM
Well after i had hope things seem to have gone wrong again.

I am not so much of an expert in Perl or the setting up of it as you may have gathered.

Ok, the situation. We have Perl 'working' but not executing (i think)

http://cnhw.co.uk/newspro/newspro.pl

This should all load up fine and has no problems. This is an improvement of what we had before when we didn't see anything there. When you 'attempt' to login (i think you are executing the script) you receive this message:

T
he 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.
--------------------------------------------------------------------------------
Please try the following:
Open the www.cnhw.co.uk home page, and then look for links to the information you want.
Click the Refresh button, or try again later.
HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services
-------------------------------------------------------------------------------

Technical Information (for support personnel)


Background:
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.


More information:
Microsoft Support




Anyone have an idea? I have (AFAIK) set the attributes on the folders correctly i.e read/write/execute.

What could be causing this message?

Thanks guys,

The Laughing Cow
12-30-2001, 08:30 AM
gah oh well i think i solved it now. FYI it was solved by Setting the allowed methods from GET to all verbs.