500 Internal server error

Status
Not open for further replies.

hwkoch

New Member
Messages
12
Reaction score
0
Points
0
Hello,
my problem is to make a programm run in the internet.
With a localhost it is not a problem.

the error log says:
[Sat Jan 23 10:12:52 2010] [error] [client 85.22.7.16] File does not exist: /home/hwkoch/public_html/500.shtml, referer: http://hwkoch.x10hosting.com/p1006.htm
[Sat Jan 23 10:11:54 2010] [error] [client 66.249.71.21] File does not exist: /home/hwkoch/public_html/public_html

I don't know, what to do.
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Hello,
my problem is to make a programm run in the internet.
With a localhost it is not a problem.

the error log says:
[Sat Jan 23 10:12:52 2010] [error] [client 85.22.7.16] File does not exist: /home/hwkoch/public_html/500.shtml, referer: http://hwkoch.x10hosting.com/p1006.htm
[Sat Jan 23 10:11:54 2010] [error] [client 66.249.71.21] File does not exist: /home/hwkoch/public_html/public_html

I don't know, what to do.
This means that the server is searching for a 500.shtml file but can't find it. Check in the .htaccess file to remove the line that start with "ErrorDocument 500 500.shtml". Also, for the cgi script that causes the error, could you post here the first line of the script. Also make sure that the text/html HTTP header is being sent.
 

hwkoch

New Member
Messages
12
Reaction score
0
Points
0
That's my .htacces file:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName hwkoch.x10hosting.com
AuthUserFile /home/hwkoch/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/hwkoch/public_html/_vti_pvt/service.grp
AddHandler cgi-script .cgi .py .pl .pm

There is noting beginning with errordocunent...


My cgi-script is very short, because I'm just try programms working in the internet.
This is my script:
#!/usr/bin/env python

# Modul cgi
import cgi, cgitb

# Ausgabe bei Fehler
cgitb.enable()

# Objekt der Klasse FieldStorage
form = cgi.FieldStorage()

# Einzelne Elemente des Objekts
if "nn" in form:
nn = form["nn"].value
if "vn" in form:
vn = form["vn"].value

# HTML-Dokument mit Variablen
print("Content-type: text/html")
print()

print("<html>")
print("<body>")

print("<p><b>registered information:</b></p>")
print("<p>name:", nn, "</p>")
print("<p>name:", vn, "</p>")

print("</body>")
print("</html>")


your last aspect:
Also make sure that the text/html HTTP header is being sent.
i don't understand.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Couple of things...

Code:
#!/usr/bin/env python

# Modul cgi
import cgi, cgitb

# Ausgabe bei Fehler
cgitb.enable()

# Objekt der Klasse FieldStorage
form = cgi.FieldStorage()

# Einzelne Elemente des Objekts
if "nn" in form:
   nn = form["nn"].value   ### INDENT HERE
if "vn" in form:
   vn = form["vn"].value   ### INDENT HERE

# HTML-Dokument mit Variablen
print("Content-type: text/html\n")   ### PUT IN NEWLINE HERE 
# print()     # SKIP THIS, IT DOES NOTHING.  
                   #YOU WANTED IT TO PRINT A NEWLINE
                   #BUT IT ONLY PRINTS A NEWLINE IF YOU PASS IT A STRING, IE
                   # print( "" )  -- print an empty string plus newline

print("<html>")
print("<body>")

print("<p><b>registered information:</b></p>")
print("<p>name:", nn, "</p>")
print("<p>name:", vn, "</p>")

print("</body>")
print("</html>")
 
Last edited:
Status
Not open for further replies.
Top