You are here: Foswiki>Tasks Web>Item13398 (05 Jul 2015, GeorgeClark)Edit Attach

Item13398: Lighttpd doesn't detect perlbrew perl, or the system PATH

Priority: Low
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Branches: master
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark
The recent updates in the Foswiki changes every shebang to #! /usr/bin/env perl what greatly helps it's usability with perlbrew environment. However, using the tools/ still runs the foswiki /bin scripts with the default system perl, so still is must be done the pretty annoying .

The following edit in the tools/ solves the problem and ensures environment homogeneity.

@@ -141,7 +141,7 @@
 else {
-    print CONF '$HTTP["url"] =~ "^/bin" { cgi.assign = ( "" => "" ) }', "\n";
+    print CONF '$HTTP["url"] =~ "^/bin" { cgi.assign = ( "" => "'.$^X.'" ) }', "\n";

  • for the /bin execute explicitly the perl under what is currently running the script. $^X
  • and because the script contains the /usr/bin/env perl the Foswiki-cgi will use the same perl too.

-- JozefMojzis - 09 May 2015

One more thing: The lighttpd doesn't provides PATH in it's default environment, so in the configure is always needed setup the SafeEnvPath (expert setting) manually. Adding the following line into the generated lighttpd.conf file, fixes this:
setenv.add-environment = ("PATH" => env.PATH )
e.g. for the development, use the user's standard $PATH. It is probably not fully OK for the production, but i'm believe than any developer who uses the tools/ for some quick foswiki hacks - could live with this. (For the production probably nobody uses the tools/ anyway.

-- JozefMojzis - 09 May 2015

ItemTemplate edit

Summary Lighttpd doesn't detect perlbrew perl, or the system PATH
ReportedBy JozefMojzis
Codebase 1.2.0 beta1, trunk
SVN Range
AppliesTo Engine
Priority Low
CurrentState Closed
Checkins distro:5c17572ce25e
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches master
masterCheckins distro:5c17572ce25e
Topic revision: r4 - 05 Jul 2015, GeorgeClark - This page was cached on 27 Oct 2016 - 20:47.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License