• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Perl path

T

Triloxigen

Guest
What path do I have to give when I want to use a Perl script (in the CGI-bin).
I cannot find how to get working in the right way.
 
The OS is Fedora Core 1 :)

I already tried #!/usr/bin/perl (what I find in the posts before i created this topic ;)) but that gives the 500 error.
 
I didn't look through all the search results, but I don't want to *assume* anything, so please do not take any offense at the following questions (some of these were covered in different threads):

Did you check ownership and perms ?

Check the httpd.conf AddHandler ?

Ah damn, my mind just went blank on the other questions, and I'm too tired to read the other post results myself right now. Sorry.

Hopefully I'll remember this thread after I get some sleep. Otherwise, sorry I didn't have better suggestions.
 
I did not change any of those things, I assumed Plesk defines this stuff correctly when creating a account.
 
Login to the server using ssh and run:

whereis perl

This should give you the full path to the perl binary.

M
 
Already dit that..
I think the problem is something else...
 
Originally posted by phoenixisp
What does your error log tell you?

[Wed Jul 13 09:09:10 2005] [error] [client xx.xxx.xxx.xx] Premature end of script headers: sendorder.cgi
 
From my experience the error 'Premature end of script headers' usually arises when there is a permissions problem. Either that or bad paths detailed within the script itself.
 
It is a standaard many used script.
I even tried 777 as permission.
 
If you run perl -c file.cgi, from the command line, do you get any compilation errors?
 
also check you definitly upload in ASCII and not binary, you will end up with horrible ^M characters on the end of every line (not viewable in all editors though)

If this is the case you can strip them easily using vi


vi filename

:%s/^v^m//g

where

^v = Ctrl +v
and
^m = Ctrl +m

You can also find that many windows based editors will add these illegal end of line characters, use a good editor like Scite where you can change/view the EOL if you need too.
 
Back
Top