Federico M. wrote:
Hi, what's wrong whit this script. I need to detect when the user press the stop button. I read:
http://perl.apache.org/docs/1.0/guide/debug.html#Handling_the__User_pressed_Stop_button__case
SO: Debian Sarge.
This is my apache.http: -----------------------
# If the perl module is installed, this will be enabled. <IfModule mod_perl.c> <IfModule mod_alias.c> Alias /perl/ /var/www/perl/ </IfModule> <Location /perl> SetHandler perl-script PerlHandler Apache::Registry PerlFixupHandler Apache::SIG LogFormat "%h %l %u %t \"%r\" %s %b &{SIGPIPE}e" Options +ExecCGI </Location> </IfModule>
I have mod_perl.so, but don't have mod_perl.c
This is my script: ------------------
#!/usr/bin/perl
you need to assign the request object to $r
my $r = shift;
$r->send_http_header; print"PID=$$\n"; $r->rflush; while(1) { $r->print("\0"); $r->rflush; last if $r->connection->aborted; $i++; sleep 1; }
If you had put a 'use strict' in there at the top it might have been easier to see this.
-- Michael Peters Developer Plus Three, LP
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html