Re: CGI buffering problems with Apache 2.2.6 and perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Unfortunately, I have received no suggestions/pointers from any one regarding this post. I had to do some hard research of the documentation before I found a solution. I am posting my findings with the hope that it may benefit others.

While it is true to say that newer Apache versions (1.3 up) does not do buffered output of CGI scripts by default, we must be cautious with any use of directives within the <Directory> tag of cgi-bin that would induce a buffering. One such directive, in my case was:

Options +Includes

In my directory tag for the cgi-bin directory there was this:

<Directory "/share/blah/cgi-bin">
   AllowOverride None
   Options +Includes
   Order allow,deny
   Allow from all
</Directory>

This made all my cgi scripts to be parsed for server side includes and thus I got a buffering effect on my browser output when my scripts ran. I removed the +Includes to None and the problem cleared.

--Zachariah Z.
Sytems Administrator,
Stanford Microarray Database


Zachariah Zachariah wrote:
Hi,

I recently upgraded from apache-1.3 to apache-2.2.6 on a Sun Solaris x86 machine with Perl 5.8. Our web application uses perl scripts in the CGI environment. A few of them do a lot of number crunching before it spews its result page. So in order to keep the user informed of what is happening we used to output intermittent messages from the standard output to the waiting page. This was done through nph scripts in Apache-1.3 and $|=1 in perl. This had worked fine for us.

When we upgraded to Apache 2.2.6 we found that our nph scripts would not load and so we changed its name from nph- to non nph- files. It was documented that from Apache-1.3 onwards, nph-files were no longer needed as Apache would be doing unbuffered CGI by default. So we converted all our nph-files to non-nph files and also any references to them from other files. However, now we find that our intermittent output are not displayed at all. Instead we get a blank page while computations are done. There is an endless wait and after all computations are complete (normally takes hours), we get the result page. This seems to suggest that unbuffered CGI is not really working in Apache-2.2 or there may be other ways to make it work which is not documented.

Has any one faced similar situations? What is the remedy? Is there a workaround? Any help or pointers would be much appreciated.

Thanks in advance,
Zachariah Z.
Systems Administrator
Stanford Microarray Database

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux