Re: FastCGI with Perl/

Mark Brown (
Sat, 08 Jun 1996 17:31:24 -0400

Message-Id: <>
Subject: Re: FastCGI with Perl/ 
In-Reply-To: Ben Davenport's message of "Sat, 08 Jun 1996 01:26:28 MDT."
Date: Sat, 08 Jun 1996 17:31:24 -0400
From: Mark Brown <>

Ben Davenport says:

    I'm having problems getting environment variables.  I'm using the compiled
    Perl5 version for Solaris 2.4 on the fastcgi web site, along with the
    Apache web server and fastcgi module.  The behavior I'm seeing is that the
    %ENV array in Perl is empty -- thus the SERVER_NAME and REMOTE_HOST
    environment variables in the sample hello world program produce nothing.

I think you are probably being bitten by the "empty initial environment" bug.
For some reason we haven't quite figured out yet, if the initial environment
to a Perl script is empty, all the environment
variables associated with the first request are lost.  Therefore,
when starting Perl, always set some environment variable using the
AppClass -initial-env option.

In the next kit this bug is mentioned in the "Integrating FastCGI
with Perl-5" document.

Hope the work-around gets you unstuck.  If anybody out there knows
enough about the guts of Perl to understand why we are having this
empty initial environment bug, please speak up!

    Does it have something to do with the following warning in the sample 
    # This needs to be run with a version of perl that has been installed
    # it well not work out of the build area.

What that warning is saying is that if you build your own Perl and run
it from the build area, it won't be able to find the FCGI extension
(or any other extensions for that matter).