cgi script runs under Opera, but not firefox

Discussion in 'Python' started by nephish@xit.net, Jun 11, 2005.

  1. Guest

    Hey there,
    i have a python cgi script that prints out html just fine in the Opera
    browser
    but doesnt print at all under FireFox.
    weird, eh?
    i am getting nothing in the apache logs about any error.
    perhaps its a firefox issue, but i doubt it.

    any suggestions. simple script here..
    , Jun 11, 2005
    #1
    1. Advertising

  2. Try View Source under Firefox, you should see everything that you're
    printing from your CGI on the server. The server side CGI will do the
    same thing no matter what browser is requesting the page.

    Next, take that source and paste into into some app that will look for
    problems like tags that aren't balanced (Dreamweaver is what I'd use.)

    -Jim

    On 11 Jun 2005 07:00:39 -0700, <> wrote:
    > Hey there,
    > i have a python cgi script that prints out html just fine in the Opera
    > browser
    > but doesnt print at all under FireFox.
    > weird, eh?
    > i am getting nothing in the apache logs about any error.
    > perhaps its a firefox issue, but i doubt it.
    >
    > any suggestions. simple script here..
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
    >
    James Carroll, Jun 11, 2005
    #2
    1. Advertising

  3. Brian Guest

    Yes, I agree that it is best to check the HTML source code of the page
    that is being generated. The server is obviously generating the code,
    but the difference here is how the two browsers are interpreting the
    HTML data.

    Check the source code for the HTML document. I bet the problem resides
    in the page itself.

    Brian
    ---


    wrote:
    > Hey there,
    > i have a python cgi script that prints out html just fine in the Opera
    > browser
    > but doesnt print at all under FireFox.
    > weird, eh?
    > i am getting nothing in the apache logs about any error.
    > perhaps its a firefox issue, but i doubt it.
    >
    > any suggestions. simple script here..
    >
    Brian, Jun 11, 2005
    #3
  4. Guest

    Well, i don't have an app that will automaticlly check a page for
    errors,
    unless bluefish will do it, i am not sure.

    the page it is supposed to print out is a response to a form entry.

    here is the source from Opera if one of you guys want to look at it.

    <html>
    <head><title>Customer Data</title></head>

    <body>
    <h1>Watkins Crop Consulting</h1>
    </body>
    </html>
    1915 Cherokee <br>
    Dalhart, Tx 79022 <br> 333-5943<br>
    <H3>gandalf</H3>

    <span style='font-weight: bold;'>Field</span> field one

    <br>
    <span style='font-weight: bold;'>Crop</span> crop one

    <br>
    <span style='font-weight: bold;'>GS</span> growing, yep

    <br>
    <br>
    <span style='font-weight: bold;'>Weeds</span> many weeds

    <br>
    <span style='font-weight: bold;'>Water</span> lots o water

    <br>
    <span style='font-weight: bold;'>Incects</span> lots o insects

    <br>
    <br>
    <span style='font-weight: bold;'>Remarks</span> comment block, could be
    short, could be long, however will we know?

    <br>
    <br>
    <br>

    <span style='font-weight: bold;'>Field</span> another field

    <br>
    <span style='font-weight: bold;'>Crop</span> another crop

    <br>
    <span style='font-weight: bold;'>GS</span> another growth stage

    <br>
    <br>
    <span style='font-weight: bold;'>Weeds</span> many many weeds

    <br>
    <span style='font-weight: bold;'>Water</span> lots more water

    <br>
    <span style='font-weight: bold;'>Incects</span> lots more insects

    <br>
    <br>
    <span style='font-weight: bold;'>Remarks</span> ok , short comment this
    time

    <br>
    <br>
    <br>
    <br>


    this is all generated by the cgi module of python and the script that
    responds to the
    form.

    thanks.
    , Jun 11, 2005
    #4
  5. Brian Guest

    Bingo, found it! Notice that you accidentally close the document before
    displaying any information...


    wrote:

    > <html>
    > <head><title>Customer Data</title></head>
    >
    > <body>
    > <h1>Watkins Crop Consulting</h1>
    > </body>
    > </html>



    <snip> Notice the </body></html> tag above. There's the problem!

    Brian
    Brian, Jun 11, 2005
    #5
  6. Guest

    Ok, i made a change in the source. now here is the source from Opera,
    still cant get firefox to work with me.

    <html>
    <head><title>Customer Data</title></head>

    <body>
    <h1>Watkins Crop Consulting</h1>
    </body>

    1915 Cherokee <br>
    Dalhart, Tx 79022 <br> 333-5943<br>
    <H3>gandalf</H3>

    <span style='font-weight: bold;'>Field</span> field one

    <br>
    <span style='font-weight: bold;'>Crop</span> crop one

    <br>
    <span style='font-weight: bold;'>GS</span> growing, yep

    <br>
    <br>
    <span style='font-weight: bold;'>Weeds</span> many weeds

    <br>
    <span style='font-weight: bold;'>Water</span> lots o water

    <br>
    <span style='font-weight: bold;'>Incects</span> lots o insects

    <br>
    <br>
    <span style='font-weight: bold;'>Remarks</span> comment block, could be
    short, could be long, however will we know?

    <br>
    <br>
    <br>

    <span style='font-weight: bold;'>Field</span> another field

    <br>
    <span style='font-weight: bold;'>Crop</span> another crop

    <br>
    <span style='font-weight: bold;'>GS</span> another growth stage

    <br>
    <br>
    <span style='font-weight: bold;'>Weeds</span> many many weeds

    <br>
    <span style='font-weight: bold;'>Water</span> lots more water

    <br>
    <span style='font-weight: bold;'>Incects</span> lots more insects

    <br>
    <br>
    <span style='font-weight: bold;'>Remarks</span> ok , short comment this
    time

    <br>
    <br>
    <br>
    <br>
    </html>

    maybe there is another place i have gakked up the source.
    , Jun 11, 2005
    #6
  7. On 11 Jun 2005 08:56:11 -0700, declaimed the following
    in comp.lang.python:

    > Ok, i made a change in the source. now here is the source from Opera,
    > still cant get firefox to work with me.
    >
    > <html>
    > <head><title>Customer Data</title></head>
    >
    > <body>
    > <h1>Watkins Crop Consulting</h1>
    > </body>


    THIS is in the wrong location... You've just told a decent
    browser that this is the end of the displayable content.

    >
    > 1915 Cherokee <br>
    > Dalhart, Tx 79022 <br> 333-5943<br>
    > <H3>gandalf</H3>
    >
    > <span style='font-weight: bold;'>Field</span> field one
    >
    > <br>
    > <span style='font-weight: bold;'>Crop</span> crop one
    >
    > <br>
    > <span style='font-weight: bold;'>GS</span> growing, yep
    >
    > <br>
    > <br>
    > <span style='font-weight: bold;'>Weeds</span> many weeds
    >
    > <br>
    > <span style='font-weight: bold;'>Water</span> lots o water
    >
    > <br>
    > <span style='font-weight: bold;'>Incects</span> lots o insects
    >
    > <br>
    > <br>
    > <span style='font-weight: bold;'>Remarks</span> comment block, could be
    > short, could be long, however will we know?
    >
    > <br>
    > <br>
    > <br>
    >
    > <span style='font-weight: bold;'>Field</span> another field
    >
    > <br>
    > <span style='font-weight: bold;'>Crop</span> another crop
    >
    > <br>
    > <span style='font-weight: bold;'>GS</span> another growth stage
    >
    > <br>
    > <br>
    > <span style='font-weight: bold;'>Weeds</span> many many weeds
    >
    > <br>
    > <span style='font-weight: bold;'>Water</span> lots more water
    >
    > <br>
    > <span style='font-weight: bold;'>Incects</span> lots more insects
    >
    > <br>
    > <br>
    > <span style='font-weight: bold;'>Remarks</span> ok , short comment this
    > time
    >
    > <br>
    > <br>
    > <br>
    > <br>


    </body>

    > </html>
    >
    > maybe there is another place i have gakked up the source.


    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
    Dennis Lee Bieber, Jun 11, 2005
    #7
  8. Guest

    fixed, thanks for all of your help.
    i am pouring over python texts and the problem is
    html... duh....

    looking for a more efficient way to jerk all of the hair outta my head.


    thanks a whole lot. your awesome
    , Jun 11, 2005
    #8
  9. Mike Meyer Guest

    writes:

    > fixed, thanks for all of your help.
    > i am pouring over python texts and the problem is
    > html... duh....


    Right. To get HTML that will work in any browser, <URL:
    http://www.anybrowser.org/campaign/ >, you really need to validate
    your HTML. w3.org provides a public validator at <URL:
    http://validator.w3.org/ > (as well as validators for CSS, RDF, XML
    Schema and link checking). If you're going to be doing a lot of work
    with such formats, you probably want to install a validator
    locally. Lots of options for that, depending on what kind of system
    you're using.

    BTW, practical experience is that you write your application to follow
    the standards, then go back and work around the bugs in various
    versions of IE.

    <mike
    --
    Mike Meyer <> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
    Mike Meyer, Jun 11, 2005
    #9
  10. Guest

    Great Advice, can see that saving me a few headaches
    thanks
    , Jun 11, 2005
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bronby
    Replies:
    1
    Views:
    592
    Andrew Thompson
    Jul 15, 2005
  2. Ollie
    Replies:
    0
    Views:
    360
    Ollie
    Oct 2, 2003
  3. Jerry Asher
    Replies:
    0
    Views:
    111
    Jerry Asher
    Jul 15, 2003
  4. kath
    Replies:
    4
    Views:
    539
    J. Gleixner
    Apr 9, 2007
  5. PerlFAQ Server
    Replies:
    0
    Views:
    374
    PerlFAQ Server
    Mar 15, 2011
Loading...

Share This Page