in reply to Re^3: Creating a "Progress" page with CGI
in thread Creating a "Progress" page with CGI

Hi Randal,

Actually I did many times both on the web and also in the book. Anyways, I didn't explain myself clearly enough. Sorry about that. With Apache 2, the unbuffering at the perl level doesn't seem to make any difference (atleast with my testing).

update: nevermind. I remembered my test wrong. ugh.. must be too close to monday

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on Re^4: Creating a "Progress" page with CGI

Replies are listed 'Best First'.
Re^5: Creating a "Progress" page with CGI
by merlyn (Sage) on Dec 06, 2005 at 19:18 UTC
    The difference is for programs like this:
    #!/usr/bin/perl ## uncomment this: ## $|++; print "content-type: text/plain\n\n"; system "date";
    When left commented, this fails (under both apache 1 and 2) because the system date comes out before the header, causing a 500 error.

    When uncommented, it works correctly.

    This is what I'm talking about. You were probably testing something else, like whether you could see it all the way through to the browser. That's a different problem, and was never related to my use of $|++.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.