We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>TWikiCfgFileNotFound (31 Mar 2004, PeterHorsfield)
Tags:
create new tag
, view all tags

Question

  • TWiki version: 01 Feb 2003
  • Perl version: 5.6.1, build 635 (ActiveState? )
  • Web server & version: Apache 1.3.27
  • Server OS: Windows 2000 Professional (no CygWin? )
  • Web browser & version: MS IE6
  • Client OS: Windows 2000 Professionnal

Error: Recieve the following error when trying to access (i.e. "http://localhost/twiki/bin/view/Main/WebHome") local install of TWiki:

TWiki Installation Error Template file view.tmpl not found or template directory not found. Check the $templateDir variable in TWiki.cfg.

Twiki was installed Twiki successfully on a laptop, at work (using wireless network card with IP dynamically assigned). When I restarted laptop, at home (hardwired network card with dynamic IP) recieved error above. Running "bin/testenv" all variables in TWiki.cfg showed up blank. When restarted laptop back at work, same error.

It appears TWiki.Cfg is not being found or read properly.

See attached testenv.htm and TWiki.cfg files for additional info.

Any suggestions/help would be much appreciated.

Thanks

-- BoHanchuk - 28 May 2003

Answer

Some things to try:

  • See error log for Apache, and debug log for TWiki - SupportGuidelines has details
  • Check you have a valid setlib.cfg in bin directory, as in the TWiki zip file
  • Check permissions to the lib directory - however it loads TWiki.pm OK so this is probably OK
  • Check permissions to the TWiki.cfg file, and that this is not locked somehow
  • Restart Apache after the IP address has been obtained - however this should not make any difference since you are on localhost anyway.

Haven't seen this before, it's an unusual one...

-- RichardDonkin - 28 May 2003

Solved! Looked in Apache error log, as suggested by Richard, and found error message indicating a missing semi-colon in TWiki.cfg. Corrected error and TWiki was up and running.

Thanks Richard, it saved me quite a bit of time and effort.

-- BoHanchuk - 28 May 2003

Glad it's working - of course, actually the problem was solved by using the SupportGuidelines smile

One other thing - could you do a perl -w TWiki.cfg from within the lib directory (on the original version) and let me know if this produces an error? If so, this could be added as a general debugging tip in the SupportGuidelines, or maybe automated within testenv.

-- RichardDonkin - 29 May 2003

Running perl -w TWiki.cfg immediately showed me where my missing quotation mark was. Just wanted to say a thank you and bump this topic for 2004! If you're hunting for a reason for that testenv error try Richard's suggestion.

-- PeterHorsfield - 30 March 2004

If it could be automated, it should, IMHO. TWiki.cfg is here to stay.

-- PeterMasiar - 30 May 2003

testenv now checks for a missing TWiki.cfg and for Perl errors in TWiki.cfg. This will require TWiki.cfg to end in 1;, which may cause a few future upgrade issues, but it's worth it to be able to report Perl syntax problems in this file. People should upgrade by taking the new TWiki.cfg and adding their own settings, in any case.

Please try this out with various broken TWiki.cfg files to see how well it works - available from CVSget:bin/testenv as usual.

-- RichardDonkin - 30 May 2003

Ran perl -w TWiki.cfg from within lib directory of original (virgin) file and recieved a long list of Name "main::yyyyyyyyyyy" used only once: possible typo at TWiki.cfg line xxx messages. See attached file for details perl_twiki_cfg.txt.

-- BoHanchuk - 07 Jun 2003

Thanks for that - could you test this with a broken TWiki.cfg using the latest testenv (from CVSget:bin/testenv)? If you want to avoid temporarily breaking your site, you can put it in something like /tmp/TWiki.cfg and edit the testenv script's BEGIN block near the top to do a require on this file.

-- RichardDonkin - 07 Jun 2003

I tested a _broken TWiki.cfg, one with a missing ";" at the end of a line. The output with the latest testenv (Jun. 12, 2003) was as follows:

Test the environment for TWiki
Please read the TWikiInstallationNotes for more information on TWiki installation. 
TWiki.cfg error<br>
WARNING: TWiki.cfg is unreadable or has a configuration problem that is causing a Perl error - the following message(s) relate to TWiki.cfg and should help locate the problem.
syntax error at C:/twiki/lib/TWiki.cfg line 162, near "$mailProgram "
Compilation failed in require at (eval 51) line 1 

It caught the error. To be noted however, the missing ";" was on line 156 which was the first non-comment line prior to line 162, "$mailProgram". Though potentially misleading, it is what I would have expected (have had to debug before smile ).

-- BoHanchuk - 13 Jun 2003

Thanks for testing this - the line no. is about as good as we can get using Perl as the TWiki.cfg file format.

-- RichardDonkin - 13 Jun 2003

Topic attachments
I Attachment Action Size Date Who Comment
elsecfg TWiki.cfg manage 21.3 K 28 May 2003 - 15:53 BoHanchuk  
txttxt perl_twiki_cfg.txt manage 5.7 K 07 Jun 2003 - 01:51 BoHanchuk Output from perl -w Twiki.cfg
htmlhtm testenvt.htm manage 13.8 K 28 May 2003 - 15:51 BoHanchuk testenv report
Topic revision: r12 - 31 Mar 2004 - 04:19:06 - PeterHorsfield
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback