- I downloaded a fresh copy of TWiki-6.0.0, created the apache config file with http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator
choosing mod_perl under Execution of TWiki's Perl scripts.
- Then I created Local.Lib.cfg, set the absolute path inside, and ran /twiki/bin/configure.
- After this I un-commented the mod_perl code in my apache conf file, and created /tools/mod_perl_startup.pl (given by ApacheConfigGenerator)
I restarted my apache server, and even though it didn't complain, I got this message when I returned back to TWiki:
TWiki Installation Error
Template "oopsattention" not found.
Check the configuration settings for {TemplateDir} and {TemplatePath}.
With the document title being "Untitled document".
This is the error_log after apache restart:
[Mon Feb 24 16:13:16 2014] [notice] caught SIGTERM, shutting down
[Mon Feb 24 16:13:17 2014] backuprestore: Variable "$cfg" will not stay shared at /www_doc/twiki/bin/backuprestore line 30.
[Mon Feb 24 16:13:17 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Mon Feb 24 16:13:17 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Feb 24 16:13:17 2014] backuprestore: Variable "$cfg" will not stay shared at /www_doc/twiki/bin/backuprestore line 30.
[Mon Feb 24 16:13:17 2014] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 24 16:13:17 2014] [notice] Digest: done
[Mon Feb 24 16:13:17 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
It complains about "$cfg not staying shared": backuprestore: Variable "$cfg" will not stay shared at /www_doc/twiki/bin/backuprestore line 30.
I tried to see if disabling the
BackupRestorePlugin in lib/LocalSite.cfg helped, but no.
However, removing the bin/backuprestore script alltogether made TWiki work again.
Reading a bit on the mod_perl documentation, it seems to me like the problem could be related to the namespace of the $cfg variable:
http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my____Scoped_Variable_in_Nested_Subroutines
Any thought on how this can be fixed? FYI I am very fresh to mod_perl
Update:
I guess adding
backuprestore
to the "do not precompile" list in /tools/mod_perl_startup.pl will be the correct thing to do?
-if ($script !~ m/configure|register|resetpasswd/) { # don't precompile uncommon commands especially configure
+if ($script !~ m/backuprestore|configure|register|resetpasswd/) { # don't precompile uncommon commands especially configure
If so,
backuprestore
should be added to the list in
http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator
.
Comments?
--
TWiki:Main.TerjeAndersen
- 2014-02-24
Thank you Terje! I updated
TWiki:TWiki.ApacheConfigGenerator
accordingly - was easier than debugging the
"$cfg not staying shared"
issue.
--
TWiki:Main.PeterThoeny
- 2014-02-24