Tags:
create new tag
view all tags

SID-01024: Win 2008 Server +TWiki 5.0.1 + LocalSite.cfg

Status: Answered Answered TWiki version: 5.0.1 Perl version: ActivePerl-5.12.2.1202-MSWin32-x64-293621
Category: CategoryInstallation Server OS: Windows 2008 Server Last update: 13 years ago

Hello

I have Installed all as described in "TWiki 4.2 Windows Installation Guide" (http://twiki.org/cgi-bin/view/TWiki/TWiki04x02WindowsInstallationGuide)

On Step "More TWiki configuration" go to http://localhost/twiki/bin/configure. and webserver return following error:

"Software error: Content-type: text/plain
Perl error when reading LocalSite.cfg:
Please inform the site admin.
BEGIN failed--compilation aborted at C:/www/twiki/lib/TWiki.pm line 526.
Compilation failed in require at C:/www/twiki/bin/view line 41.
BEGIN failed--compilation aborted at C:/www/twiki/bin/view line 41. "

I try to find this file in installation zip, but without any success.

Help me please, with installation.

Dmitrij

-- DmitrijGolubev - 2010-11-15

Discussion and Answer

The error happens if you run the view script and the LocalSite.cfg does not exist yet. The configure script tries to read the file if it exists. If not, it creates it once you save the configuration. After configuring TWiki, view should work too.

-- PeterThoeny - 2010-11-16

I understand, why error is happened, but when I making request to localhost/twiki/configure file LocalSite.cfg does not created.

How I understand configurating TWiki processed throught localhost/twiki/configure page.

Could you tell me why I have this error and how can I solve it.

I am able to see welcome page.

-- DmitrijGolubev - 2010-11-16

Hello.

First time in localhost/twiki/configure in General path settings section the path are suggested.

Click on Next button, set an admin password and clic on Save password and save button. That should create the LocalSite.cfg file.

Check if file access rights are ok.

-- EnriqueCadalso - 2010-11-16

Problem is that Configure page does not loaded. Instead page I see Software error.

-- DmitrijGolubev - 2010-11-16

The error you posted, BEGIN failed--compilation aborted at C:/www/twiki/bin/view line 41" indicates that you are calling the view script. What is the exact error message you get when you run configure?

-- PeterThoeny - 2010-11-16

Hello

OS: Windows 2008 Server x64
Perl: ActivePerl-5.12.2.1202-MSWin32-x64-293621.msi (x64; http://www.activestate.com/activeperl/downloads)
Apache: httpd-2.2.17-win32-x86-openssl-0.9.8o.msi
twiki: 5.0.1.zip

Ist is possible, that problem is in using 64 bit perl or apache+ssl?

Today made clear installation and have the same error.

No, I try to open page http://localhost/twiki/bin/configure and have error (apache error.log)


[Wed Nov 17 11:19:11 2010] [notice] Child 2616: Starting thread to listen on port 80.
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: Content-type: text/plain, referer: http://localhost/twiki/
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: , referer: http://localhost/twiki/
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: Perl error when reading LocalSite.cfg: , referer: http://localhost/twiki/
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: Please inform the site admin., referer: http://localhost/twiki/
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: BEGIN failed--compilation aborted at C:/www/twiki/lib/TWiki.pm line 526., referer: http://localhost/twiki/
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: Compilation failed in require at C:/www/twiki/bin/view line 41., referer: http://localhost/twiki/
[Wed Nov 17 11:19:33 2010] [error] [client 127.0.0.1] [Wed Nov 17 11:19:33 2010] view: BEGIN failed--compilation aborted at C:/www/twiki/bin/view line 41., referer: http://localhost/twiki/


in apache.conf was changes following rows: DocumentRoot "C:/www"

<Directory "C:/www"> ... </Directory>


apache.conf -------------------------------

ServerRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2"

Listen 80

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so

<IfModule mpm_netware_module>
<IfModule mpm_winnt_module>

User daemon
Group daemon
</IfModule>
</IfModule>

ServerAdmin email@companyPLEASENOSPAM.com
ServerName 192.168.10.53:80
DocumentRoot "C:/www"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

# <Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs">
<Directory "C:/www">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule dir_module> DirectoryIndex index.html </IfModule>

<FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch>

ErrorLog "logs/error.log"
LogLevel warn

<IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule>

CustomLog "logs/access.log" common </IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/"
</IfModule>

<IfModule cgid_module> </IfModule>

<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin">
AllowOverride None Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# twiki configuration
Include conf/twiki.conf


twiki.conf -------

BrowserMatchNoCase ^Accoona blockAccess
BrowserMatchNoCase ^ActiveAgent blockAccess
BrowserMatchNoCase ^Attache blockAccess
BrowserMatchNoCase BecomeBot blockAccess
BrowserMatchNoCase ^bot blockAccess BrowserMatchNoCase Charlotte/ blockAccess BrowserMatchNoCase ^ConveraCrawler blockAccess BrowserMatchNoCase ^CrownPeak-HttpAgent blockAccess BrowserMatchNoCase ^EmailCollector blockAccess BrowserMatchNoCase ^EmailSiphon blockAccess BrowserMatchNoCase ^e-SocietyRobot blockAccess BrowserMatchNoCase ^Exabot blockAccess BrowserMatchNoCase ^FAST blockAccess BrowserMatchNoCase ^FDM blockAccess BrowserMatchNoCase ^GetRight/6.0a blockAccess BrowserMatchNoCase ^GetWebPics blockAccess BrowserMatchNoCase ^Gigabot blockAccess BrowserMatchNoCase ^gonzo1 blockAccess BrowserMatchNoCase ^Google\sSpider blockAccess BrowserMatchNoCase ^ichiro blockAccess BrowserMatchNoCase ^ie_crawler blockAccess BrowserMatchNoCase ^iGetter blockAccess BrowserMatchNoCase ^IRLbot blockAccess BrowserMatchNoCase Jakarta blockAccess BrowserMatchNoCase ^Java blockAccess BrowserMatchNoCase ^KrakSpider blockAccess BrowserMatchNoCase ^larbin blockAccess BrowserMatchNoCase ^LeechGet blockAccess BrowserMatchNoCase ^LinkWalker blockAccess BrowserMatchNoCase ^Lsearch blockAccess BrowserMatchNoCase ^Microsoft blockAccess BrowserMatchNoCase ^MJ12bot blockAccess BrowserMatchNoCase MSIECrawler blockAccess BrowserMatchNoCase ^MSRBOT blockAccess BrowserMatchNoCase ^noxtrumbot blockAccess BrowserMatchNoCase ^NutchCVS blockAccess BrowserMatchNoCase ^RealDownload blockAccess BrowserMatchNoCase ^Rome blockAccess BrowserMatchNoCase ^Roverbot blockAccess BrowserMatchNoCase ^schibstedsokbot blockAccess BrowserMatchNoCase ^Seekbot blockAccess BrowserMatchNoCase ^SiteSnagger blockAccess BrowserMatchNoCase ^SiteSucker blockAccess BrowserMatchNoCase ^Snapbot blockAccess BrowserMatchNoCase ^sogou blockAccess BrowserMatchNoCase ^SpiderKU blockAccess BrowserMatchNoCase ^SpiderMan blockAccess BrowserMatchNoCase ^Squid blockAccess BrowserMatchNoCase ^Teleport blockAccess BrowserMatchNoCase ^User-Agent\: blockAccess BrowserMatchNoCase VoilaBot blockAccess BrowserMatchNoCase ^voyager blockAccess BrowserMatchNoCase ^W3C blockAccess BrowserMatchNoCase ^w3search blockAccess BrowserMatchNoCase ^Web\sDownloader blockAccess BrowserMatchNoCase ^WebCopier blockAccess BrowserMatchNoCase ^WebDevil blockAccess BrowserMatchNoCase ^WebSec blockAccess BrowserMatchNoCase ^WebVac blockAccess BrowserMatchNoCase ^Webwhacker blockAccess BrowserMatchNoCase ^Webzip blockAccess BrowserMatchNoCase ^Wells blockAccess BrowserMatchNoCase ^WhoWhere blockAccess BrowserMatchNoCase www\.netforex\.org blockAccess BrowserMatchNoCase ^WX_mail blockAccess BrowserMatchNoCase ^yacybot blockAccess BrowserMatchNoCase ^ZIBB blockAccess BrowserMatchNoCase ^$ blockAccess

<IfModule mod_perl.c>
# Mod_perl preloading
PerlSwitches -T
</IfModule>

ScriptAlias /twiki/bin "c:/www/twiki/bin"

Alias /twiki/pub "c:/www/twiki/pub"

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/+twiki/+pub/+(TWiki|Sandbox)/+.+
RewriteRule ^/+twiki/+pub/+(.*)$ /twiki/bin/viewfile/$1 [L,PT]

<Directory "c:/www/twiki/bin">
AllowOverride None
Order Allow,Deny
Allow from all
Deny from env=blockAccess

Options ExecCGI FollowSymLinks
SetHandler cgi-script

# Password file for TWiki users
AuthUserFile c:/www/twiki/data/.htpasswd
AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith)'
AuthType Basic

# File to return on access control error (e.g. wrong password)
ErrorDocument 401 /twiki/bin/view/TWiki/TWikiRegistration

<FilesMatch "^(configure)$">
SetHandler cgi-script
Order Deny,Allow
Deny from all
Allow from 192.168.10.53
Require user MyAdminUser
Satisfy Any
</FilesMatch>

</Directory>

<Directory "c:/www/twiki/pub">
Options None
AllowOverride None
Order Allow,Deny
Allow from all
Deny from env=blockAccess

AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi
</Directory>

-- DmitrijGolubev - 2010-11-17

Have tryed on Windows Server 2008 (32bit), perl 32bit and apache without ssl. Have a same problem.

I think in this manual missed some required step(s) or installation on windows is different for twiki version 4.2.x and 5.0.x. http://twiki.org/cgi-bin/view/TWiki/TWiki04x02WindowsInstallationGuide

Dmitrij

-- DmitrijGolubev - 2010-11-17

I am having the exact same problem (64 bit WIndows 7, Strawberry Perl, Apache 2.2). The "well you're running view before you've configured" comments don't help, as this is the result of running configure, as Dmitrij originally posted. I followed the steps exactly as described, and when I run configure, I get:

  Software error:
  
  Content-type: text/plain
  
  Perl error when reading LocalSite.cfg: 
  Please inform the site admin.
  BEGIN failed--compilation aborted at C:/Twiki/lib/TWiki.pm line 526.
  Compilation failed in require at C:/Twiki/bin/view line 41.
  BEGIN failed--compilation aborted at C:/Twiki/bin/view line 41.

"What is the exact error message you get when you run configure? " The above IS the exact error we get when we run configure. --> http://localhost/twiki/bin/configure

I've checked write permissions on Twiki/lib, the shebang values for the various Perl scripts, etc. Not sure what else there is to do. the CGI config for Apache is clearly working, otherwise we wouldn't be able to get this far.

Anyone have any suggestions? Thanks!

Brian

-- BrianHoogerbrugge - 2010-12-22

SUCCESS! I had a previous install on another machine. Grabbed a copy of LocalSite.cfg from there, tweaked it for this machine and tried again. Worked perfectly!

It would be nice to know why the failure was happening, but now that I have a working LocalSite.cfg, I'm good to go.

-- BrianHoogerbrugge - 2010-12-23

We have now another report that looks the same, SID-01063. Wondering what causes this...

-- PeterThoeny - 2011-01-02

Tried the same as Brian did. No success. Maybe just some details are missing. In my old system LocalSite.cfg resides in /etc/twiki. In the new system the directory didn't exist. Therefore, I created it, put the cfg there, tuned it, and adjusted the permissions. As I said: No success. The inevitable question now: Where does TWiki expect the LocalSite.cfg by default?

-- DetlefMarxsen - 2011-01-03

The first time you save the configuration it creates a twiki/lib/LocalSite.cfg file with settings based on selected configuration. The configure script in turn is data driven based on twiki/lib/TWiki.spec.

-- PeterThoeny - 2011-01-03

Well, I put the file there. Partial success: No compliation error anymore. The configure script requests me to login now. Therefore, I copied the old .htpasswd file into .../data. Anyhow, I am stuck in an endless login loop. Some other file seems to be required for a successful login. Which?

-- DetlefMarxsen - 2011-01-04

The configure script stores the admin password in twiki/lib/LocalSite.cfg. Empty out the password setting like this:

$TWiki::cfg{Password} = '';

Check the apache config settings if the twiki/bin/configure requires authentication. Remove that auth temporarily until your site is configured properly.

-- PeterThoeny - 2011-01-04

You pointed me to the right place. The problem was the entry Require user JohnDoe in the file twiki_httpd.conf. Changed the user and configure started to cooperate.

-- DetlefMarxsen - 2011-01-05

Sorry, still one problem left over:
When I try to edit a page, I don't get a login dialog but instantly get a page stating "Access Check on Main.WebHome failed. Action "edit": authentication required."

It is absolutely OK that an authentication is requested ... but I need a login dialog to do that ...

At the configuration page, the login dialog shows up as expected.

-- DetlefMarxsen - 2011-01-10

The Account pull-down has the login link. If you use TemplateLogin you can login as admin with the configure password. Register yourself, then you can login as DetlefMarxsen.

-- PeterThoeny - 2011-01-11

... stuck at another misconfiguration now: After clicking "edit" and logging in, the server is not found - the address line then contains "http://twiki/bin..." (the "localhost" is missing). Checked the whole config - could not find the source of this misconfig ... Why is the "localhost" missing? Sorry, but this installation seems to be screwed up entirely ...

-- DetlefMarxsen - 2011-01-14

I fixed this by making sure localhost and the IP address of the machine I was configuring it from was included on the ApacheConfigGenerator.

It worked immediately after adding that one IP address.

-- AdamParker - 2011-06-05

Hi there,

Just attempting to install Twiki for the first time and I have hit the same roadblock as above ie. No LocalSite.cfg file -> error message when Perl attempts to read it. Not sure how to write one, and find -name LocalSite.cfg (and variations) reveals no such file is present anywhere in the Twiki tree. As this error comes up on the configure page, the suggestion of having Twiki make said file after setting some options on that page is a non-option. Can someone a sample of the said file for me to modify?

Thanks!

-- LloydRoberts - 2011-06-23

Also, if it's not a stupid question, are LocalLib.cfg and LocalSite.cfg intended to be different files? LocalLib.cfg is referenced in the documentation regarding setup, but not LocalSite.cfg.

Thanks!

-- LloydRoberts - 2011-06-23

They are different. LocalLib.cfg resides in twiki/bin and points to the lib directory (this needs to be configured manually), and LocalSite.cfg resides in twiki/lib and is created by the configure script the first time you save the configuration. It seems like there is an issue on Windows.

Why not try the DownloadTWikiVM? It is easier to install and performs better than a native TWiki install on Windows.

-- PeterThoeny - 2011-06-23

This thread has not been closed out so I guess I'll communicate that I am migrating to Twiki 5.0 from a successful 4.0 on Redhat Linux and I get the same error as noted above, "Perl error when reading LocalSite.cfg...........etc" So it is not a probelm with Windows only.

David Steininger

-- DavidSteininger - 2011-11-18

I've recently run into this same problem configuring TWiki on two different, freshly installed, Ubuntu Linux 10.04.3 machines, It took me four days to get it working.

I'll start by saying that the Installation Guide is very difficult to read, understand, and follow. So I'm not sure if I'm even following what it intends to tell me to do.

I fought my way through getting the first machine running - and saw all the symptoms described here (and more) along the way. I ended up with a heavily marked up Install Guide, and more in my notebook. Once I got TWiki up on that first machine (the final of many problems in that case was the ownership of the .htpasswd file), I thought that repeating the feat on the second machine would be straightforward, but it turns out to be just as frustration as before.

Again I find myself running http://localhost/twiki/bin/configure and staring at the message:


Software error:

Content-type: text/plain

Perl error when reading LocalSite.cfg: Please inform the site admin. BEGIN failed--compilation aborted at /var/www/twiki/lib/TWiki.pm line 528. Compilation failed in require at /var/www/twiki/bin/view line 41. BEGIN failed--compilation aborted at /var/www/twiki/bin/view line 41.

For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.


What gets me? I'm at the stage where I think configure is supposed to be generating this file, not trying to read it.

Ask me some questions and I'll try to fill in the details I need to get through this. In return, I'll offer to attempt a cleanup of the Installation Guide to make it easier to use.

-- RobRobason - 2012-02-05

P.S. BTW, I'm installing TWiki 5.1.1

-- RobRobason - 2012-02-05

This is strange. Your message is "BEGIN failed--compilation aborted at /var/www/twiki/bin/view line 41", but you get the message when running configure? The error message indicates that you run the view script.

More than one person reported this issue. What could it be? It is almost as if the configure script redirects to the view script. This could happen with an apache rewrite rule, but that is unlikely.

-- PeterThoeny - 2012-02-08

Same problem here when running configure for the first time, only on an Ubuntu machine with freshly installed twiki:

=============== Software error:

Content-type: text/plain

Perl error when reading LocalSite.cfg: Please inform the site admin. BEGIN failed--compilation aborted at /var/www/twiki/lib/TWiki.pm line 528. Compilation failed in require at /var/www/twiki/bin/view line 41. BEGIN failed--compilation aborted at /var/www/twiki/bin/view line 41. ===============

The path in LocalLib.cfg is set, the permissions and ownerships should be correct. Any more information I could provide?

Here is the file listing: http://pastebin.com/tNW7GZhx and the LocalLib.cfg: http://pastebin.com/7smKCsMA

-- HelgePhilipp - 2012-02-17

I had the same issue. Eventually traced this down to a problem with my conf.d/twiki, where the "Allow from ..." line wasn't working properly with just "localhost". I had to change it to the following:

Allow from localhost 127.0.0.1

Worked fine after that.

-- JohnKuzma - 2012-03-19

Thanks John for reporting this!

-- PeterThoeny - 2012-03-19

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Win 2008 Server +TWiki 5.0.1 + LocalSite.cfg
SupportCategory CategoryInstallation
TWiki version 5.0.1
Server OS Windows 2008 Server
Web server Apache 2.2.17-win32
Perl version ActivePerl-5.12.2.1202-MSWin32-x64-293621
Edit | Attach | Watch | Print version | History: r31 < r30 < r29 < r28 < r27 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r31 - 2012-03-19 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.