Question
.
- TWiki version: Dec 2001 version
- Web server: apache 1.3.12 (Unix)
- Server OS: Solaris 8
- Web browser: IE 5.1
- Client OS:
I have configured TWiki, I can run commands such as edit,
preview but not view.
running
http://myserver:port#/cgibin/view
tries to find
http://myserver:port#/cgibin/view/Main/WebHome
and it returns Internal Server Error.
The error log has these messages:
[Fri Apr 5 16:05:29 2002] [error] [client xxx.xxx.xxx.xx] File does not exist:/usr/local/apache/htdocs/pub/wikiHome.gif
[Fri Apr 5 16:05:31 2002] [error] (8)Exec format error: exec of /usr/local/apache/cgi-bin/view failed
[Fri Apr 5 16:05:31 2002] [error] [client ....] Premature end of script headers: /usr/local/apache/cgi-bin/view
[Fri Apr 5 16:05:39 2002] [error] (8)Exec format error: exec of /usr/local/apache/cgi-bin/view failed
[Fri Apr 5 16:05:39 2002] [error] [client ....] Premature end of script headers: /usr/local/apache/cgi-bin/view
The gif file does exist in the correct location. Have set the permission to 666.
TWIki.cfg is something like this (This is not the complete file
just posting the initial setup)
# /cgi-bin/view/Main/WebHome : link of TWiki icon in upper left corner :
$wikiHomeUrl = "http://twiki.org/";
# Host of TWiki URL : (Example "http://myhost.com:123")
#$defaultUrlHost = "http://your.domain.com";
$defaultUrlHost="http://snow:8080";
# /cgi-bin : cgi-bin path of TWiki URL:
#$scriptUrlPath = "/twiki/bin";
$scriptUrlPath = "/cgi-bin";
# /p/pub : Public data path of TWiki URL (root of attach
ments) :
#$pubUrlPath = "/snow/pub";
$pubUrlPath ="/pub";
# Public data directory, must match $pubUrlPath :
$pubDir = "/usr/local/apache/htdocs/pub";
# Template directory :
#$templateDir = "/home/httpd/twiki/templates";
$templateDir = "/export/home/twiki/templates";
# Data (topic files) root directory :
#$dataDir = "/home/httpd/twiki/data";
$dataDir = "/export/home/twiki/data";
testenv results into no error messages.
-- Main.TP - 06 Apr 2002
Answer
Are you sure that your shebang line is correct in the
view script? Apache seems to be saying that it can't exec the
view script at all, so it may also be an Apache misconfiguration - see
this email
.
Try running
./view >/tmp/foo.html from the TWiki bin directory - if this works, it's probably Apache.
Also, download the latest
testenv from
CVSget:bin/testenv
, and try the PATH_INFO test to see if that's something to do with this (unlikely, but it may help).
You should also check that the
pub dir and the GIF are readable by 'nobody' (in fact, the directory also needs to be writeable for attachments to work.)
--
RichardDonkin - 06 Apr 2002
Thanks for the help. I was able to move further in this.
The #!/usr/bin/perl line had to do with the problem.
I had changed the path in all of these. Somehow the files
got corrupt or what I am not sure, I copied new set "view"
file to twiki/bin and it worked.
But not the problem is I cannot save any thing.
I can create/preview, but when I try to save I get the following
error message:
Topic save error
During save of file
Main an error was found by the version control system. Please notify your TWiki administrator.
/usr/local/bin/ci -q -l -m'none' -t-none -w'guest' /export/home/twiki/data/Main/WebHome.txt 2>&1 1>/dev/null
ci: /export/home/twiki/data/Main/RCS/WebHome.txt,v: Permission denied
Go back in your browser and save your changes locally.
Topic
WebHome . { OK? }
RCS works fine on my system, the permissions are correct (666)
but there is no directory called
RCS unser Main. Even if
I remove
RCS from the URL the error does not go away.
Problem is solved!
--
TWikiGuest - 26 Apr 2002
Sounds like there is still a problem - check that you have this setting in
TWiki.cfg, which stops the use of the
RCS subdirectory:
$useRcsDir = "0";
Also, see
TWikiDebugging and update Store.pm as mentioned there so that you can trace the exact
RCS commands executed.
--
RichardDonkin - 27 Apr 2002