1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Perl path

Discussion in 'Plesk for Linux - 8.x and Older' started by Triloxigen, Jul 12, 2005.

  1. Triloxigen

    Triloxigen Guest

    0
     
    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.
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
  3. Triloxigen

    Triloxigen Guest

    0
     
    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.
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    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.
     
  5. Triloxigen

    Triloxigen Guest

    0
     
    I did not change any of those things, I assumed Plesk defines this stuff correctly when creating a account.
     
  6. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    #!/usr/bin/perl is the correct path to perl. Make sure that you chmod the executable to 755.
     
  7. Triloxigen

    Triloxigen Guest

    0
     
    I did that, but still error 500 :|
     
  8. Gorgon@

    Gorgon@ Guest

    0
     
    Login to the server using ssh and run:

    whereis perl

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

    M
     
  9. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    What does your error log tell you?
     
  10. Triloxigen

    Triloxigen Guest

    0
     
    Already dit that..
    I think the problem is something else...
     
  11. Triloxigen

    Triloxigen Guest

    0
     
    [Wed Jul 13 09:09:10 2005] [error] [client xx.xxx.xxx.xx] Premature end of script headers: sendorder.cgi
     
  12. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    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.
     
  13. Triloxigen

    Triloxigen Guest

    0
     
    It is a standaard many used script.
    I even tried 777 as permission.
     
  14. tmonsen

    tmonsen Guest

    0
     
    If you run perl -c file.cgi, from the command line, do you get any compilation errors?
     
  15. mikk

    mikk Basic Pleskian

    23
    73%
    Joined:
    Jan 29, 2005
    Messages:
    83
    Likes Received:
    0
    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.
     
Loading...