can't find cgi-bin/post.cgi

Status
Not open for further replies.

valkyriejanet16

New Member
Prime Account
Messages
10
Reaction score
0
Points
0
I have a simple HTML index page, including:

<form ACTION="http://valkyrie.x10.mx/cgi-bin/post.cgi" METHOD="GET">
<textarea name="Message" rows="5" cols="40" onfocus="this.value=''; this.onfocus=null;">Enter your status update here.</textarea>
<P>
<INPUT TYPE="submit" title="FOO">
</form>

The form displays OK. When I click the button, however, I get this message:

404 Not Found
The server can not find the requested page:

valkyrie.x10.mx/cgi-bin/post.cgi?Message=hello (port 80)

The file post.cgi is in fact in the cgi-bin directory. Its permissions are set to 0777 (yes, I know that needs to be dialed back but I was being sure).

The cgi-bin folder perms are 0755. The file is shows below. It is a python file, and its first line is

#!/usr/bin/python

Anyway the message says the file is not found. Please advise me. Thanks!

The file is this:

#!/usr/bin/python

import cgi, urllib2, urllib
import cgitb
cgitb.enable()

# This file needs to be readable and writable from this cgi
file_name = "my_url"

form = cgi.FieldStorage()

# If we have Message then this is a status update.
if "Message" in form:
# Redirect back to the form
print "Status: 302 Moved"
print "Location: http://www.myurl.com/path/to/form"
print

# Read in the url from the file
f = open(file_name,'r')
base_url = f.read()

# Build the complete url with query args.
message = form["Message"].value
args = "?Message=%s" % urllib.quote(message)

# Make the request, giving the status to the script.
response = urllib2.urlopen(base_url + args)

# If we have URL then this is an URL update
if "URL" in form:
# Write the url to the file, overwriting the existing file.
f = open(file_name,'w')
f.write(form["URL"].value)

# Let the caller know it worked.
print "Content-Type: text/html"
print
print "OK"
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
The cgi-bin is disabled on all free hosting accounts.
 

valkyriejanet16

New Member
Prime Account
Messages
10
Reaction score
0
Points
0
I see now that I have to be premium to use python. However, the signup for free clearly states that I can use PHP. Does that mean I can only use PHP in line not via cgi-bin?

I have signed up for premium, although I feel blackmailed. How long before that takes effect.

Thanks...

---------- Post added at 08:05 PM ---------- Previous post was at 07:55 PM ----------

I have received the upgrade accepted email and am still getting the cannot find message. Now what is likely wrong?

Thanks,
 

masshuu

Head of the Geese
Community Support
Enemy of the State
Messages
2,293
Reaction score
50
Points
48
Premium accounts are on a different server. If you used the same domain as the one on your free account, you will need to open a ticket to have it moved over.
 

valkyriejanet16

New Member
Prime Account
Messages
10
Reaction score
0
Points
0
Thanks ... would think they would do that auto when i upgraded. anyway will file ticket ... thanks
 
Status
Not open for further replies.
Top