[Cologne-pm] FastCGI Frage
Gerd Franke
gerdfranke at netcologne.de
Wed Jun 6 12:24:34 PDT 2007
Hallo!
Ich hoffe, es sitzen noch einige Katholen vor dem Rechner....
Ich wollte mal FastCGI ausprobieren.
FCGI-0.67.tar.gz habe ich mittels Webmin erfolgreich installiert.
Dann habe ich untenstehendes unbedeutendes Test-Programmchen
zusammenkopiert.
Als Ausgabe bekomme ich nur "Testing FastCGI: 0 -:- 0".
Offensichtlich wird das Prog jedesmal neu gestartet (print STDERR
"New FastCGI! \n";).
Was habe ich nicht verstanden oder übersehen???
Gruß Gerd
#! /usr/bin/perl -w
use FCGI; # Imports the library; required line
#--- Initialization code
my $cnt = 0;
my $request = FCGI::Request();
print STDERR "New FastCGI! \n";
#--- Response loop
while ($request->Accept() >= 0)
{
# body of response loop
print "Content-type: text/html\r\n\r\n";
print Show_Html($cnt, $request->IsFastCGI() );
$cnt++;
}
sub Show_Html
{
my $count = shift;
my $IsFastCGI = shift;
#--------------------------
my $html = "";
$html .= '<HTML><HEAD><title>CGI::FASTCGI Example</title>
</HEAD><BODY><h1>Testing FastCGI: ';
$html .= $count . ' -:- ' . $IsFastCGI;
$html .= '</h1></BODY></HTML>';
return $html;
};
More information about the Cologne-pm
mailing list