On Wed, 24 May 2017, hw wrote:> Paul Heinlein schrieb: >> On Tue, 23 May 2017, m.roth at 5-cent.us wrote: >> >> > hw wrote: >> > > >> > > are there packages replacing the ancient perl version in >> > > Centos 7 with a more recent one, like 5.24? At least the >> > > state feature is required. >> >> Perl 5.24 is available in SCL, in the centos-sclo-rh repository. >> > Thanks, I tried rh-perl, and it worked for a test. It does not > replace the existing perl installation. You have to explicitly use > that version.Not replacing the existing system Perl is a feature, not a bug. It allows the 'Enterprise' side of CentOS to keep going with no unexpected surprises.> I?m not sure if that?s possible for CGI. I do get 5.24 after > running 'scl enable rh-perl524 bash'. Is there a way to get that > for CGI?It all depends on how you launch your CGI, but in general there shouldn't be a problem beginning your script with #!/opt/rh/.../perl -- Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/
Paul Heinlein schrieb:> On Wed, 24 May 2017, hw wrote: > >> Paul Heinlein schrieb: >>> On Tue, 23 May 2017, m.roth at 5-cent.us wrote: >>> >>> > hw wrote: >>> > > > > are there packages replacing the ancient perl version in >>> > > Centos 7 with a more recent one, like 5.24? At least the >>> > > state feature is required. >>> >>> Perl 5.24 is available in SCL, in the centos-sclo-rh repository. >>> >> Thanks, I tried rh-perl, and it worked for a test. It does not replace the existing perl installation. You have to explicitly use that version. > > Not replacing the existing system Perl is a feature, not a bug. It allows the 'Enterprise' side of CentOS to keep going with no unexpected surprises. > >> I?m not sure if that?s possible for CGI. I do get 5.24 after running 'scl enable rh-perl524 bash'. Is there a way to get that for CGI? > > It all depends on how you launch your CGI, but in general there shouldn't be a problem beginning your script with > > #!/opt/rh/.../perl >It seems that lighttpd uses the perl version that is assigned in the configuration while ignoring the LIBRARY_PATH variable set with mod_setenv, causing the perl version not to find a library it requires. Even with a shell script as wrapper that sets and exports LIBRARY_PATH, perl can not find the library. Trying to set LIBRARY_PATH for lighttpd through systemd also doesn?t work. Why is the LIBRARY_PATH always being ignored? When I run perl from the shell, it works just fine, so it?s not perl itself ignoring the path.
On May 24, 2017, at 1:58 PM, hw <hw at gc-24.de> wrote:> > It seems that lighttpd uses the perl version that is assigned in > the configurationThis is one of the advantages of Plack vs mod_perl, by the way: decoupling the Perl version from the web server version.> while ignoring the LIBRARY_PATH variable set with mod_setenvAre you certain you don?t mean LD_LIBRARY_PATH here? https://stackoverflow.com/questions/4250624/> Even with a shell script as wrapper that sets and exports LIBRARY_PATH, > perl can not find the library. Trying to set LIBRARY_PATH for lighttpd > through systemd also doesn?t work.Beware that some layers of the OS actively redefine LD_LIBRARY_PATH in order to avoid security exploits. I wouldn?t be surprised if systemd did that in some cases, for good cause.