Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    2

    Default Perl Scripts Not work

    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. #2
    Member
    Join Date
    Aug 2004
    Posts
    472

    Default

    make sure the perl script has got the permission 755

  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    103

    Default

    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. #4
    ckh
    ckh is offline
    Member
    Join Date
    Dec 2003
    Posts
    333

    Default

    What does the error log say? That usually gives you a better indication of what's wrong then the error page.

  5. #5
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    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. #6
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    Try these perms:

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

  7. #7
    Member
    Join Date
    Jun 2005
    Posts
    103

    Default

    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. #8
    Member
    Join Date
    Jun 2005
    Posts
    103

    Default

    I fixed the problem by deleting the cgi-bin folder and reupload the folder and files via ftp.

    Thank you for your replies.

Similar Threads & Tags
Similar threads

  1. Replies: 2
    Last Post: 10-26-2009, 07:28 AM
  2. Perl Scripts...
    By MethOd63 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-13-2008, 12:24 AM
  3. How to protect from perl scripts?
    By gvard in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-23-2005, 10:49 AM
  4. Perl scripts not working
    By welo in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-21-2005, 07:36 AM
  5. Perl scripts and DBI
    By tester in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-30-2002, 05:35 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube