Item1152: Foswiki fails in mod_perl and other similar environments after change related to Item906

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.3
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: StefanPalm
Waiting For:
Last Change By: KennethLavrsen
I used the Foswiki-upgrade-1.0.2.tgz, followed the upgrade instructions as stated on http://foswiki.org/Download/FoswikiRelease01x00x02 and additionaly I adjusted the perl location (using the "rewriteshbang.pl"). While the "configure" script runs fine, requesting any other page page fails with:

[Thu Feb 26 08:39:39 2009] [notice] Apache/2.2.11 (Unix) mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Thu Feb 26 08:39:51 2009] [error] Cannot find current script './httpd' at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n at /swmtools/lib/perl5/5.10.0/FindBin.pm line 173\n\tFindBin::init() called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\tFindBin::BEGIN() called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval {...} called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\trequire FindBin.pm called at /WEB_DATA/foswiki/foswiki-prd/bin/view line 39\n\tModPerl::ROOT::ModPerl::Registry::WEB_DATA_foswiki_foswiki_2dprd_bin_view::BEGIN() called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval {...} called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval 'package ModPerl::ROOT::ModPerl::Registry::WEB_DATA_foswiki_foswiki_2dprd_bin_view;sub handler {local $0 = \\'/WEB_DATA/foswiki/foswiki-prd/bin/view\\';use warnings;\n\n#line 1 /WEB_DATA/foswiki/foswiki-prd/bin/view\n#!/swmtools/bin/perl -wT\n#\n# Foswiki - The Free and Open Source Wiki, http://foswiki.org/\n#\n# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors\n# Copyright (C) 2008-2009 Foswiki Contributors.\n# All Rights Reserved. TWiki Contributors and Foswiki Contributors\n# are listed in the AUTHORS file in the root of this distribution.\n# NOTE: Please extend that file, not this notice.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version. For\n# more details read LICENSE in the root of this distribution.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n#\n# As per the GPL, removal of this notice is prohibited.\n\n\nuse strict;\nuse warnings;\n\nBEGIN {\n    if ( defined $ENV{GATEWAY_INTERFACE} ) {\n        $Foswiki::cfg{Engine} = \\'Foswiki::Engine::CGI\\';\n        use CGI::Carp qw(fatalsToBrowser);\n        $SIG{__DIE__} = \\\\&CGI::Carp::confess;\n    }\n    else {\n        $Foswiki::cfg{Engine} = \\'Foswiki::Engine::CLI\\';\n        require Carp;\n        $SIG{__DIE__} = \\\\&Carp::confess;\n    }\n    $ENV{FOSWIKI_ACTION} = \\'view\\';\n    require FindBin;\n    my ($bin) = $FindBin::Bin =~ /^(.*)$/;\n    use Cwd ();\n    my ($setlibCfg) = Cwd::abs_path( "$bin/setlib.cfg" ) =~ /(.*)/;\n    require $setlibCfg;\n}\n\nuse Foswiki;\nuse Foswiki::UI;\n$Foswiki::engine->run();\n\n}\n;' called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/RegistryCooker.pm line 676\n\tModPerl::RegistryCooker::compile('ModPerl::Registry=HASH(0x27b1e8)', 'SCALAR(0x3ab210)') called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/RegistryCooker.pm line 406\n\tModPerl::RegistryCooker::convert_script_to_compiled_handler('ModPerl::Registry=HASH(0x27b1e8)') called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/RegistryCooker.pm line 163\n\tModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x27b1e8)') called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/Registry.pm line 31\n\tModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0x27b0e8)') called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval {...} called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\nBEGIN failed--compilation aborted at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206.\n at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\trequire FindBin.pm called at /WEB_DATA/foswiki/foswiki-prd/bin/view line 39\n\tModPerl::ROOT::ModPerl::Registry::WEB_DATA_foswiki_foswiki_2dprd_bin_view::BEGIN() called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval {...} called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval 'package ModPerl::ROOT::ModPerl::Registry::WEB_DATA_foswiki_foswiki_2dprd_bin_view;sub handler {local $0 = \\'/WEB_DATA/foswiki/foswiki-prd/bin/view\\';use warnings;\n\n#line 1 /WEB_DATA/foswiki/foswiki-prd/bin/view\n#!/swmtools/bin/perl -wT\n#\n# Foswiki - The Free and Open Source Wiki, http://foswiki.org/\n#\n# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors\n# Copyright (C) 2008-2009 Foswiki Contributors.\n# All Rights Reserved. TWiki Contributors and Foswiki Contributors\n# are listed in the AUTHORS file in the root of this distribution.\n# NOTE: Please extend that file, not this notice.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version. For\n# more details read LICENSE in the root of this distribution.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n#\n# As per the GPL, removal of this notice is prohibited.\n\n\nuse strict;\nuse warnings;\n\nBEGIN {\n    if ( defined $ENV{GATEWAY_INTERFACE} ) {\n        $Foswiki::cfg{Engine} = \\'Foswiki::Engine::CGI\\';\n        use CGI::Carp qw(fatalsToBrowser);\n        $SIG{__DIE__} = \\\\&CGI::Carp::confess;\n    }\n    else {\n        $Foswiki::cfg{Engine} = \\'Foswiki::Engine::CLI\\';\n        require Carp;\n        $SIG{__DIE__} = \\\\&Carp::confess;\n    }\n    $ENV{FOSWIKI_ACTION} = \\'view\\';\n    require FindBin;\n    my ($bin) = $FindBin::Bin =~ /^(.*)$/;\n    use Cwd ();\n    my ($setlibCfg) = Cwd::abs_path( "$bin/setlib.cfg" ) =~ /(.*)/;\n    require $setlibCfg;\n}\n\nuse Foswiki;\nuse Foswiki::UI;\n$Foswiki::engine->run();\n\n}\n;' called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/RegistryCooker.pm line 676\n\tModPerl::RegistryCooker::compile('ModPerl::Registry=HASH(0x27b1e8)', 'SCALAR(0x3ab210)') called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/RegistryCooker.pm line 406\n\tModPerl::RegistryCooker::convert_script_to_compiled_handler('ModPerl::Registry=HASH(0x27b1e8)') called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/RegistryCooker.pm line 163\n\tModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x27b1e8)') called at /swmtools/lib/perl5/site_perl/5.10.0/sun4-solaris-thread-multi/ModPerl/Registry.pm line 31\n\tModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0x27b0e8)') called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\n\teval {...} called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 206\nCompilation failed in require at /WEB_DATA/foswiki/foswiki-prd/bin/view line 39.\n at /WEB_DATA/foswiki/foswiki-prd/bin/view line 39\n\tModPerl::ROOT::ModPerl::Registry::WEB_DATA_foswiki_foswiki_2dprd_bin_view::BEGIN() called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 44\n\teval {...} called at /swmtools/lib/perl5/5.10.0/FindBin.pm line 44\n\teval 'package ModPerl::ROOT::ModPerl::Registry::WEB_DATA_foswiki_foswiki_2dprd_bin_view;sub handler {local $0 = \\'/WEB_DATA/foswiki/foswiki-prd/bin/view\\';use warnings;\n\n#line 1 /WEB_DATA/foswiki/foswiki-prd/bin/view\n#!/swmtools/bin/perl -wT\n#\n# Foswiki - The Free and Open Source Wiki, http://foswiki.org/\n#\n# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors\n# Copyright (C) 2008-2009 Foswiki Contributors.\n# All Rights Reserved. TWiki Contributors and Foswiki Contributors\n# are listed in the AUTHORS file in the root of this distribution.\n# NOTE: Please extend that file, not this notice.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version. For\n# more details read LICENSE in the root of this distribution.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of...

System setup: Solaris10 (SPARC) w/ Apache/2.2.11 (Unix) mod_perl/2.0.4 Perl/v5.10.0

Remark: I checked Codebase "1.0.1" as "1.0.2" is not available for selection

-- StefanPalm - 26 Feb 2009

As suggested by Barbar I installed the ModPerlEngineContrib. With this extension the described problem disappears but a new error occurs in the log and page forwarding fails (the port is ripped of the URL).
Use of uninitialized value in substitution iterator at /WEB_DATA/foswiki/foswiki-prd/lib/Foswiki/Render.pm line 549.

-- StefanPalm - 26 Feb 2009

Can someone remind me why we had to "fix" this SetLib thing? It worked in 1.0.0. Why was it fixed? Do I have to cancel a release for the second time now because of the same issue?? Can we revert the whole thing back to how it worked in 1.0.0?

-- KennethLavrsen - 26 Feb 2009

Check Item906

Not that I agree with the conclusion, as FindBin is known not to work with mod_perl, and thus created this mess. Now that we have it, I hope the installer builders will be really happy smile

-- OlivierRaginel - 27 Feb 2009

Seems we need to revert the Item906 changes - http://trac.foswiki.org/changeset/2514

-- KennethLavrsen - 27 Feb 2009

Since none of the two developers responsible for 906 have shown any sign of wanting to repair what they broke I have now reverted the "fix" that the rest of us did not know we needed.

-- KennethLavrsen - 27 Feb 2009

ItemTemplate edit

Summary Foswiki fails in mod_perl and other similar environments after change related to Item906
ReportedBy StefanPalm
Codebase 1.0.1
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:b078bafdd448 distro:b36af7a795d7
TargetRelease patch
ReleasedIn 1.0.3
Topic revision: r8 - 01 Mar 2009, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy