• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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