Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hello again,

I have an odd problem, related to the "server push" one I had earlier.

I have an apache 2 webserver with two cgi-bin/ directories, both configured the same (as far as I can see in conf/httpd.conf).

There is the same Perl CGI program in each of them, printing out HTML on the fly to a Firefox 3 web browser in two tabs.

One of them prints the HTML out as it goes, the other waits for the webpage to finish before printing. This is my test code in each of the cgi-bin/ directories :
#!/usr/bin/perl # $Header$ use strict; use CGI qw(:standard); # No buffering of output to browser. # $|++; print header; print qq { <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=wind +ows-1252"> <META NAME="Generator" CONTENT="vi"> <TITLE>the Title</TITLE> </HEAD> <BODY> }; print "Starting ...<br>\n"; for (my $i=0; $i < 10; $i++) { print "$i<br>\n"; sleep 1; } print "</BODY></HTML>"; exit;
In one tab the text is printed as it goes, the other it waits.

Is there anyone who can tell me where to look for any Perl/Apache config changes between the two cgi-bin/ directories? It all seems most odd to me! I don't think we use mod_perl, so that's not the thing. Printing @INC and perl -V in each of the cgi-bin progs yeilds the same results.

One thing - one of the cgi-bin dirs has an .htaccess file in the dir above cgi-bin, and the other doesn't. Would this affect the buffering behaviour?
AuthUserFile /the_root/dir_one/security/security.pwd AuthGroupFile /dev/null AuthName EnterPassword Authtype Basic require valid-user
Any pointers would be useful, I'm sure its obvious, but I can't put my finger on why these things are different, running the same perl file.

Thanks in advance!


In reply to cgi buffering by Caesura

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (1)
    As of 2018-04-23 03:34 GMT
    Find Nodes?
      Voting Booth?