Tags:
create new tag
view all tags

Question

Hi, I have a problem running twiki on a SuSE OpenExchange 4 Server. The problem seems to be related to RCS and that the regexps used to get author and date in RcsWrap somehow doesnt work. When I do a rlog of the file the revisions show. So RCS seems to work on the file but TWiki doesnt get hold of the revisions. I have also tried to download the latest RCS version and compiled it myself but that didnt help either.

Apache error_log

[Fri Jan 30 10:39:30 2004] rdiff: Use of uninitialized value in bitwise or (|) at ../lib/TWiki/Store/RcsWrap.pm line 327.
[Fri Jan 30 10:39:30 2004] rdiff: Use of uninitialized value in bitwise or (|) at ../lib/TWiki/Store/RcsWrap.pm line 327.
[Fri Jan 30 10:42:09 2004] edit: Use of uninitialized value in substitution (s///) at /srv/www/twiki/bin/edit line 279.
[Fri Jan 30 10:42:48 2004] save: Use of uninitialized value in bitwise or (|) at ../lib/TWiki/Store/RcsWrap.pm line 327.
[Fri Jan 30 10:42:48 2004] save: Use of uninitialized value in bitwise or (|) at ../lib/TWiki/Store/RcsWrap.pm line 327.




sub getRevisionInfo
[snip]
       if( ! $rcsError ) {
            $rcsOut =~ /date: (.*?);  author: (.*?);.*\n(.*)\n/;
            $date = $1 | "";
[Line 327]  $user = $2 | "";
            $comment = $3 || "";                                                                      


rlog /srv/www/twiki/data/Main/WebHome.txt

RCS file: /srv/www/twiki/data/Main/WebHome.txt,v
Working file: /srv/www/twiki/data/Main/WebHome.txt
head: 1.6
branch:
locks: strict
        wwwrun: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;     selected revisions: 6
description:
none
----------------------------
revision 1.6    locked by: wwwrun;
date: 2004/01/30 10:17:15;  author: setca;  state: Exp;  lines: +1 -5
none
----------------------------
revision 1.5
date: 2004/01/30 09:54:59;  author: setca;  state: Exp;  lines: +3 -1
none
----------------------------
revision 1.4
date: 2004/01/30 09:42:48;  author: setca;  state: Exp;  lines: +3 -1      




Environment

TWiki version: TWikiBetaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: SuSE OpenExchange 4, 2.4.21-138
Web server: Apache
Perl version: v5.8.0 built for i586-linux-thread-multi
Client OS: win2k
Web Browser: netscape

-- TomasCarlsson - 30 Jan 2004

Updated testenv with:

foreach $line (@storeSettings) {
        print $line;
        print "
"; }

Test the environment for TWiki

Please read the TWikiInstallationNotes for more information on TWiki installation.
dataDir
/srv/www/twiki/data
pubDir
/srv/www/twiki/pub
attachAsciiPath
.(txt|html|xml|pl)$
dirPermission
509
useRcsDir
0
initBinaryCmd
/usr/bin/rcs -x,v -q -i -t-none -kb %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
tmpBinaryCmd
/usr/bin/rcs -x,v -q -kb %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
ciCmd
/usr/bin/ci -x,v -q -l -m'
' -t-none -w'guest' %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
coCmd
/usr/bin/co -x,v -q -p%REVISION% -ko %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
histCmd
/usr/bin/rlog -x,v -h %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
infoCmd
/usr/bin/rlog -x,v -r%REVISION% %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
diffCmd
/usr/bin/rcsdiff -x,v -q -w -B -r%REVISION1% -r%REVISION2% -ko %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
breakLockCmd
/usr/bin/rcs -x,v -q -l -M %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
ciDateCmd
/usr/bin/ci -l -x,v -q -mnone -t-none -d'2026-01-14' -w'guest' %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
delRevCmd
/usr/bin/rcs -x,v -q -o%REVISION% %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
unlockCmd
/usr/bin/rcs -x,v -q -u %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt
lockCmd
/usr/bin/rcs -x,v -q -l %FILENAME% 2>&1 >> /srv/www/twiki/data/debug.txt

Environment variables:

AUTH_TYPEBasic
DOCUMENT_ROOT/srv/www/htdocs
GATEWAY_INTERFACECGI/1.1
HTTP_ACCEPTtext/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
HTTP_ACCEPT_CHARSETISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODINGgzip,deflate
HTTP_ACCEPT_LANGUAGEen-us,en;q=0.5
HTTP_CACHE_CONTROLmax-age=0
HTTP_CONNECTIONkeep-alive
HTTP_HOST10.34.0.1
HTTP_KEEP_ALIVE300
HTTP_USER_AGENTMozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
PATH/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin
QUERY_STRING
REMOTE_ADDR10.34.0.134
REMOTE_PORT1186
REMOTE_USERxxxxx
REQUEST_METHODGET
REQUEST_URI/twiki/bin/testenv2
SCRIPT_FILENAME/srv/www/twiki/bin/testenv2
SCRIPT_NAME/twiki/bin/testenv2
SERVER_ADDR10.34.0.1
SERVER_ADMINmailadmin@xxxxxx
SERVER_NAMExxxxxxxxxxxxx
SERVER_PORT80
SERVER_PROTOCOLHTTP/1.1
SERVER_SIGNATURE
Apache/1.3.26 Server at xxxxxxxxxxx Port 80
SERVER_SOFTWAREApache/1.3.26 (UnitedLinux) ApacheJServ/1.1.2 mod_webapp/1.2.0-dev mod_ssl/2.8.10 OpenSSL/0.9.6g PHP/4.2.2 mod_perl/1.27
UNIQUE_IDQBokmwoiAAEAAH@dV@k

CGI Setup:

Operating system:Unix (linux)
Perl version:5.8.0
@INC library path:../lib
/usr/lib/perl5/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi

/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.

Note: This is the Perl library path, used to load TWiki modules, third-party modules used by some plugins, and Perl built-in modules.
TWiki module in @INC path:
OK, TWiki.pm found (TWiki version: 19 Jan 2004)
Required Perl modules:
CGI (2.81)
CGI::Carp (1.23)
File::Copy (2.05)
Optional Perl modules:
Algorithm::Diff (1.01)
MIME::Base64 (2.12)
POSIX (1.05)
Encode (1.75)
Note: Optional module 'Unicode::MapUTF8' not installed - check TWiki documentation to see if your configuration needs this module.

Note: Optional module 'Unicode::Map' not installed - check TWiki documentation to see if your configuration needs this module.
Note: Optional module 'Unicode::Map8' not installed - check TWiki documentation to see if your configuration needs this module.
Note: Optional module 'Jcode' not installed - check TWiki documentation to see if your configuration needs this module.

PATH_INFO:
Note: For a URL such as http://10.34.0.1/twiki/bin/testenv2/foo/bar, the correct PATH_INFO is /foo/bar, without any prefixed path components. Test this now - particularly if you are using Apache or IIS, or are using a web hosting provider. The page resulting from the test link should have a PATH_INFO of /foo/bar.
mod_perl:Not used for this script (mod_perl loaded into Apache)
User:wwwrun
Note: Your CGI scripts are executing as this user.
Warning: Since your CGI script is not running as user nobody, you need to change the locks in the *,v RCS files of the TWiki distribution from nobody to wwwrun. Otherwise, changes to topics will not be logged by RCS.

Group(s): nogroup nogroup

Test of TWiki.cfg Configuration:

$defaultUrlHost:http://10.34.0.1
Note: This must match the protocol and host part (with optional port number) of the TWiki URL.
$scriptUrlPath:/twiki/bin
Note: This must match the 'cgi-bin' part of the URL used to access the TWiki cgi-bin directory.
$pubUrlPath:/twiki/pub
Note: This must be the URL of the public directory.This is not set correctly if the /twiki/pub/wikiHome.gif image below is broken:
$pubDir:/srv/www/twiki/pub
Note: This is the public directory, as seen from the file system. It must correspond to $pubUrlPath.
$templateDir:/srv/www/twiki/templates
Note: This is the TWiki template directory, as seen from the file system.
$dataDir:/srv/www/twiki/data
Note: This is the data directory where TWiki stores all topics.
$mailProgram:/usr/sbin/sendmail -t -oi -oeq
Note: This is the mail program TWiki uses to send mail.
$rcsDir:/usr/bin
Note: This is the directory where RCS is located.
RCS Version:5.7
Note: This is the version of RCS which will be used.
$lsCmd:/bin/ls
Note: This is the file list program TWiki uses to list topics.
$egrepCmd:/usr/bin/egrep
Note: This is a program TWiki uses for search.
$fgrepCmd:/usr/bin/fgrep
Note: This is a program TWiki uses for search.
$safeEnvPath:/bin:/usr/bin
Note: This is used to initialise the PATH variable, and is used to run the 'diff' program used by RCS, as well as to run shell programs such as Bourne shell or 'bash'.

Path and Shell Environment

Original PATH:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin
Note: This is the PATH value passed in from the web server to this script - it is reset by TWiki scripts to the PATH below, and is provided here for comparison purposes only.
Current PATH:/bin:/usr/bin
Note: This is the actual PATH setting that will be used by Perl to run programs. It is normally identical to $safeEnvPath, unless that variable is empty.
diff:GNU diff was found on the PATH - this is the recommended diff tool.
Note: The 'diff' command is used by RCS to compare files.

Internationalisation and Locale Setup

$useLocale:0
Note: This TWiki.cfg setting controls whether locales are used by Perl and 'grep'.
$siteLocale:en_US.ISO-8859-1
Note: This TWiki.cfg parameter sets the site-wide locale - for example, de_AT.ISO-8859-1 where 'de' is the language code, 'AT' the country code and 'ISO-8859-1' is the character set. Use the locale -a command on your system to determine available locales.
Warning: Unable to set locale to en_US.ISO-8859-1, actual locale is C - please test your locale settings. This warning can be ignored if you are not planning to use locales (e.g. your site uses English only) - or you can set en_US.ISO-8859-1 to C, which should always work.

$upperNational:
Note: This TWiki.cfg parameter is used when $useLocale is 0, to work around missing or non-working locales. It is also used with Perl 5.005 for efficiency reasons - upgrading to Perl 5.6.1 with working locales is recommended, and removes the need for this. If required, this parameter should be set to the upper case accented characters you require in your locale.
$lowerNational:
Note: This TWiki.cfg parameter is used whenever $upperNational is used. This parameter should be set to the lower case accented characters you require in your locale.

-- TomasCarlsson - 30 Jan 2004

Answer

There is definitely an issue with the bitwise "or" logic, it should read like:

       if( ! $rcsError ) {
            $rcsOut =~ /date: (.*?);  author: (.*?);.*\n(.*)\n/;
            $date = $1 || "";
            $user = $2 || "";
            $comment = $3 || "";                                          

Could you report if this fixes the problem?

Also, how does the bug manifest itself?

-- PeterThoeny - 30 Jan 2004

The bug manifests itself in the way that the RCS file (foobar,v) updates and that can be verified with rlog foobar, but TWiki does only show revision 1.1. I changed the settings for locktimeout and the one for not updating revision if updated within the timeout interval and that seems to help. I will change to || and report back.

-- TomasCarlsson - 31 Jan 2004

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-04-02 - 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.