Jump to content

Recommended Posts

Posted

Hi,

 

I created a file main.py in /public_html/cgi-bin

 

#!/usr/bin/python
print "Content-Type: text/html\n\n"
print "Hello World"
But I got following error, anyone can help me?
Internal Server Error

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

Please contact the server administrator, webmaster@sw.heliohost.org 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 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

 

 

Posted

The error is because you're using dos line endings, and this is a linux server. The easiest way to fix this is to create the file through cpanel filemanager using the code editor and copy/paste your code in. This will ensure that your file has the correct line endings. Another option is to use a windows editor that understands proper line endings such as notepad++.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...