By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

cgi script runs under Opera, but not firefox

P: n/a
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..

Jul 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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, ne*****@xit.net <ne*****@xit.net> 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

Jul 19 '05 #2

P: n/a
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
---
ne*****@xit.net 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..

Jul 19 '05 #3

P: n/a
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.

Jul 19 '05 #4

P: n/a
Bingo, found it! Notice that you accidentally close the document before
displaying any information...
ne*****@xit.net 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
Jul 19 '05 #5

P: n/a
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.

Jul 19 '05 #6

P: n/a
On 11 Jun 2005 08:56:11 -0700, ne*****@xit.net 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.
-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 19 '05 #7

P: n/a
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

Jul 19 '05 #8

P: n/a
ne*****@xit.net 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 <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 19 '05 #9

P: n/a
Great Advice, can see that saving me a few headaches
thanks

Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.