FastCGI Test Script
Join the DZone community and get the full member experience.
Join For FreeIf you're having trouble with FastCGI (as I was), this Perl script can help you see if the problem is at the Apache end or the app end. In my case I'd simply not deleted the old Ruby sessions for my Rails app when switching from CGI to FCGI ;-) This script proved my Apache wasn't broken, at least.
#!/usr/bin/perl
use FCGI;
$cnt = 0;
while (FCGI::accept() >= 0)
{
print ("Content-type: text/html\r\n\r\n");
print ("\nFastCGI Demo Page (perl) \n\n");
print ("FastCGI Demo Page (perl)
\n");
print ("This is coming from a FastCGI server.\n
\n");
print ("Running on $ENV{USER} to $ENV{REMOTE_HOST}\n
\n");
$cnt++;
print ("This is connection number $cnt\n");
}
Test script
Testing
Opinions expressed by DZone contributors are their own.
Comments