Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:01:56+00:00 2026-06-04T04:01:56+00:00

I’m using hostgator and they swear that python is supported, but I’ve yet to

  • 0

I’m using hostgator and they swear that python is supported, but I’ve yet to see one working python script. I’ve tried several scripts, my latest one is the one they give on their website:

#!/usr/bin/python
print "Content-type: text/html\n\n";
print "<html><head>";
print "<title>CGI Test</title>";
print "</head><body>";
print "<p>Test page using Python</p>";
print "</body></html>";

I’m getting an Internal Server Error:
http://elkuzu.com/cgi-bin/test.py

The file has 755 permissions, so does the folder cgi-bin. They refused to help me with what they call “coding” problems… but with all that I’ve tried and received nothing but Internal Server Errors, I’m thinking the problem is with them. Anyone know what could be wrong?

Error Logs:

[Sat May 19 09:11:38 2012] [error] [client 74.129.48.242] File does not exist: /home/elkuzu/public_html/404.shtml
[Sat May 19 09:11:38 2012] [error] [client 74.129.48.242] File does not exist: /home/elkuzu/public_html/favicon.ico
[Sat May 19 09:11:37 2012] [error] [client 74.129.48.242] File does not exist: /home/elkuzu/public_html/500.shtml

I’ve talked with my host (hostgator) and they’ve turned it into a ticket, which makes me think that something is up on their end.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:01:57+00:00Added an answer on June 4, 2026 at 4:01 am

    There is documentation on how to use Python as a CGI.

    In your case, the issue was the line endings. They’re the hidden character at the end of each line.

    On a Unix-like system, The line endings in the program file must be
    Unix style line endings. This is important because the web server
    checks the first line of the script (called shebang) and tries to run
    the program specified there. It gets easily confused by Windows line
    endings (Carriage Return & Line Feed, also called CRLF), so you have
    to convert the file to Unix line endings (only Line Feed, LF). This
    can be done automatically by uploading the file via FTP in text mode
    instead of binary mode, but the preferred way is just telling your
    editor to save the files with Unix line endings. Most editors support
    this.

    On Windows (ie Notepad) they’re represented as (CR LF, or \r\n), whereas on unix they’re (LF or \n).

    In Notepad++, you can view line endings as symbols like so: View -> Show Symbol -> Show End of Line

    To replace windows linebreaks with unix ones, you can use: Search -> Replace…

    In the replace dialogue, find \r\n, and replace them with \n. Ensure the Extended Search mode is selected.

    Notepad++ replace dialogue screenshot


    Alternatively, you can use Edit -> EOL Conversion -> UNIX Format

    Notepad++ EOL Conversion screenshot

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm making a simple page using Google Maps API 3. My first. One marker
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.