Closed Thread
Results 1 to 5 of 5

Thread: can't find cgi-bin/post.cgi

  1. #1
    valkyriejanet16 is offline x10Hosting Member valkyriejanet16 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    10

    can't find cgi-bin/post.cgi

    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"

  2. #2
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: can't find cgi-bin/post.cgi

    The cgi-bin is disabled on all free hosting accounts.

  3. #3
    valkyriejanet16 is offline x10Hosting Member valkyriejanet16 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    10

    Re: can't find cgi-bin/post.cgi

    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,

  4. #4
    masshuu's Avatar
    masshuu is offline Head of the Geese masshuu has a spectacular aura about
    Join Date
    Oct 2007
    Location
    Las Colinas, Tx
    Posts
    2,262

    Re: can't find cgi-bin/post.cgi

    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.
    Just leading the flock.
    Livewire
    Masshuu ------ carl6969
    descalzo ------------------- Smith6612
    Bryon--------------------------------- Corey
    If you find any post helpful or useful, duck
    \ / This for that post and rep it up.

  5. #5
    valkyriejanet16 is offline x10Hosting Member valkyriejanet16 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    10

    Re: can't find cgi-bin/post.cgi

    Thanks ... would think they would do that auto when i upgraded. anyway will file ticket ... thanks

Closed Thread

Similar Threads

  1. Post your specs
    By Fahad in forum Computers & Technology
    Replies: 298
    Last Post: 04-01-2012, 05:19 AM
  2. i cant find my name server
    By youngbrix35264 in forum Free Hosting
    Replies: 1
    Last Post: 05-20-2011, 06:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers