Bug #6596

Environment variables (context, rewrite urls, ...) are not recognized with FCGI + Apache

Added by Robert Lemke over 9 years ago. Updated over 8 years ago.

Should have
Start date:
Due date:
% Done:


PHP Version:
Has patch:


On a Linux server with Apache + FastCGI + PHP the SetEnv directive in the .htaccess file seem to have no effect.

The reason is that directives like


end up in PHP's $_SERVER array as "REDIRECT_FLOW3_CONTEXT" under certain circumstances.

I can't see when / why this happens, but FLOW3 could easily detect this.

Associated revisions

Revision 3edc11f0 (diff)
Added by Robert Lemke over 9 years ago

[+BUGFIX] FLOW3 (Core): FLOW3 now detects environment variables which are prepended with "REDIRECT_". This seems to happen under certain circumstances with FCGI + Apache. Resolves #6596

Revision d3bd4305 (diff)
Added by Robert Lemke over 9 years ago

[+BUGFIX] FLOW3 (Core): A few pieces were missing for the environment fix. Now hopefully resolves #6596

Revision 417d6231 (diff)
Added by Robert Lemke over 9 years ago

[+BUGFIX] FLOW3 (Core): Another glitch which relates to #6596

Revision 23867970 (diff)
Added by Robert Lemke over 9 years ago

[+BUGFIX] FLOW3 (Core): Found out that the getRequestPath() method returned a wrong path in the FCGI case. Probably now finally fixes #6596

Revision 2fc8d241 (diff)
Added by Karsten Dambekalns over 9 years ago

[+API] FLOW3 (Utility): Added detectBaseUri() to Environment. Given an URI instance it tries to detect the corresponding base URI.
[+API] FLOW3 (Utility): Added getScriptRequestPath() to Environment, returns the path to the actual script request relative to the document root.
[~API] FLOW3 (Utility): Renamed getScriptRequestPathAndName() to getScriptRequestPathAndFilename() in Environment.
[~TASK] FLOW3 (MVC): Reverted recent change by Robert related to request path handling, relates to #6596
[~TASK] FLOW3 (Utility): Some more changes to getRequestUri() in Environment, relates to #6596, relates to #3029, relates to #3375.
[~TASK] FLOW3 (Resource): Make use of new getScriptRequestPath() method in FileSystemPublishingTarget.

Revision c2b62c16 (diff)
Added by Robert Lemke over 9 years ago

[~API] FLOW3 (Utility): Renamed detectBaseUri() to getBaseUri().
[~TASK] FLOW3 (MVC): Recomitted my previous change in getRequestPath and reworked the path rendering in the Request object (now is called "route path"). Relates to #6596
[~BUGFIX] FLOW3 (Security): The WebRedirect entry point now takes the Base URI into account. That means you'll have to specify a relative URI in your settings for defining a web entry point (i.e. no leading slash!).


#1 Updated by Robert Lemke over 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3859.

Also available in: Atom PDF