500 internal server error

Discussion in 'Perl' started by ibrahimsyde, Aug 6, 2007.

  1. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Hello guys,
    I have recently moved complete site which was build using php,cgi and pl files. After migrating the files i am getting this error.

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@xanam.co.uk 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.

    I have tried setting executing permission but still don't work.

    Your help on this would be much appreciated.
    Many thanks in advance.

    Regards
    Ibrahim
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Check the file type, whether its a file with UNIX line endings or with Windows line endings!
     
  3. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Hi there,
    File Type: perl script text executable.
    This is what I could see in their FTP control panel. if this is not you want me to check then please guide me how to find the files file type.
    thanks for your help
     
  4. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Download EditPlus from www.editplus.com, install it and then open your file in that it'll show either UNIX or PC in the status bar...! Easy aint it?
     
  5. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    hi there,
    thanks for the software link, Yes it says PC.
     
  6. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    So, you'll have to convert it to UNIX to run it on an Unix server, where '\n' is the line ending character.
     
  7. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    thanks pradeep,
    is this a problem with every windows files running on unix servers? or this has got only to do with the cgi-perl script pages?
    am sorry how can i convert these files to make it work on unix servers please?
     
  8. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    #!/usr/bin/perl

    every page has this tag so i guess this is what you meant by converting into unix compatible ?
     
  9. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Some Unix servers are configured to auto-detect file endings! Scripts cause problems when they have wrong line-endings!
    Open a new file in EditPlus, goto Document>File Format and select Unix and then copy-paste the contents of the file which you would like to convert and then save it!
     
  10. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    thanks again, i have changed the file type to unix, then uploaded to the server, it still gives the same error message as above. i dont have any clue why is it behaving like this. although this cgi file has 755 permission.
     
  11. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Try running it from the command line, may be there are some modules missing!
     
  12. ibrahimsyde

    ibrahimsyde New Member

    Joined:
    Aug 6, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    pradeep,
    any reason why i cant .pl files on the server please?
     
  13. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    There can be lost of reasons, wrong shell-bang line, missing modules, server configuration; its quite difficult to identify the problem from here!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice