The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Perl Scripts Not work

Discussion in 'General Discussion' started by 0xyGens, Apr 19, 2007.

  1. 0xyGens

    0xyGens Registered

    Joined:
    Apr 18, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    hi im new cpanel user

    an err0r


    Code:
    --------------------------------------------------
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    Please contact the server administrator, webmaster@xyz.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    
    More information about this error may be available in the server error log.
    
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    ------------------------------------------
    folder user : mantar [not root ]
    hAS cgi : Y

    but not work
     
  2. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    16
    make sure the perl script has got the permission 755
     
  3. Frankc

    Frankc Well-Known Member

    Joined:
    Jun 18, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    16
    Hi Dave

    I searching now for almost a hour without get anything that can help. Would you perhaps be able to give some directions?

    I installed a very simply cgi script (hit counter) on a website. Javascript to call the hit counter cgi file, that then open text file and update count.

    Works perfectly but when I copied the whole website the script don't work on the other account. Except for the Premature end of ..... in the error log there is nothing else.

    Precise identical accounts except for the domain. Reuploaded the cgi and txt files several times from both the working website as well as the original file. Also retested the cgi permissions to be 755 and the txt file on 666 and 777. (work at 666 on other account)

    Any idea what's going on pls?
     
  4. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    What does the error log say? That usually gives you a better indication of what's wrong then the error page.
     
  5. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    Premature End of Script Headers is either a permissions/ownership issue, or a scripting issue.

    Make sure the script is executable and owned by user:user

    If it is and it doesn't work, it needs to have a valid HTML header printed in it like:

    print "Content-type: text/html\n\n";

    but preferably a more valid XHTML header. If you post the script and the exact error, I'm sure it will be easy to track down.
     
  6. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    Try these perms:

    Code:
    drwxr-xr-x   2 user user 4096 Apr  4 15:02 cgi-bin/
     
  7. Frankc

    Frankc Well-Known Member

    Joined:
    Jun 18, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the post.

    Seems that I found the problem but don't know how to fix it.

    I copied the files from other account and then chown it to the current user but it don't work even if I delete and reupload the cgi files via ftp.

    (I created another site but this time upload the cgi-files manually and it works. (Did the same with the other accounts so the problem must be with the ownership of the cgi-bin folder itself)
     
  8. Frankc

    Frankc Well-Known Member

    Joined:
    Jun 18, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    16
    I fixed the problem by deleting the cgi-bin folder and reupload the folder and files via ftp.

    Thank you for your replies.
     
Loading...

Share This Page