• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3825: Template login on twiki running on apache at port 8080 acts strange

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent No Action Required   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


I've observed a strangeness with port numbers. Right, now I have 4.1.1 running on an apache 2.x server with mod_perl at port 8080. I have an apache 1.x server at port 80 but it runs perl as CGI.

For the most part, the 8080 server works great. I was using Firefox and except for a few odd things with plugins, there were no problems.

With IE 6, the bin/login would come up with no css or images. Looking at the browser source, it showed the urls all had :8080:8080 on them. (I am using template login).

One plugin "weirdness" is if I use the 80 server with the attachment plugin that takes apart ZIP files, they are broken into their component parts. With the 8080, the zip file is attached.

-- TWiki:Main/MatthewKoundakjian - 30 Mar 2007

I just patched to 4.1.2 and was looking through the configure ... I have DefaultUrlHost set to http://hal:8080/ ... but under PATH_INFO above, I find

For a URL such as http://hal:8080:8080/twiki/bin/configure/foo/bar, the correct PATH_INFO is /foo/bar, without any prefixed path components. Click here to test this - particularly if you are using mod_perl, Apache or IIS, or are using a web hosting provider. Look at the new path info here. It should be /foo/bar.

So the double ports may be in (or affect) more places than I realize.

-- TWiki:Main.MatthewKoundakjian - 30 Mar 2007

If I change DefaultUrlHost to http://hal/ (no port), I still get the double ports ... hovering over the "Click here to test this" link shows two ports.

-- TWiki:Main.MatthewKoundakjian - 30 Mar 2007

The DefaultUrlHost value should not have a trailing slash - so make it http://hal:8080 instead of http://hal:8080/. That said, I am running more or less the same setup (in particular, an Apache 2.0 with mod_perl on a nonstandard port) and never had double ports - and could not reproduce the behaviour even if I add the superfluous slash.

If your problem persists even after having removed the slash (and keep in mind that you need to restart your Apache to make TWiki re-read its configuration), could you please post your lib/LocalSite.cfg (after removing anything which looks like a password), and your Apache configuration?

-- TWiki:Main.HaraldJoerg - 30 Mar 2007

Presently I have no port on the DefaultUrlHost at all and it does it. Will add the port and no trailing slash.

I looked in lib/LocalSite.cfg and found

$TWiki::cfg{DefaultUrlHost} = 'http://hal.sbca.ms.northgrum.com:8080';

The value that showed up in bin/configure was


I changed the value in bin/configure but lib/LocalSite.cfg didn't change.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

Thought I should mention ... I"m getting errors in the Twiki web on my machine. Loading http://hal:8080/twiki/bin/view/TWiki/InstalledPlugins results in

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.
exec failed: Arg list too long

Apache log shows: - - [02/Apr/2007:12:40:07 -0700] "GET /twiki/bin/view/TWiki/InstalledPlugins HTTP/1.1" 200 136

twiki warn log:

| 02 Apr 2007 - 12:40 | exec failed: Arg list too long at /lv0/www/htdocs/twiki-4.1.1/lib/TWiki/Sandbox.pm line 389.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

Two things I discovered.... one is my LocalLib.cfg was pointing back at an older version of twiki. Big bonehead move. Forgot to check that file when I changed versions.

And, at line 389 of Sandbox.pm, I changed the exec to just be exec($path) rather than exec($path,@args).... @args was some astoundingly long list of fully qualified topic path names.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

Sigh, this is nutty. That exec change broke searching. So, I restored it as it was ... I still get the exec failed in the debug log. I just ran the 2.x apache at port 80 and the thing acts the same way so whatever I have set up that's screwing up the search is unrelated to the port.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

I disabled QuickSearchPlugin (whatever that is) and most of the TWiki web pages load ok. WebSearch doesn't.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

Make that WebSearch ... WebSearch seems to function in the other webs.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

er ... make that TWiki.WebSearch

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

data/TWiki has 517 .txt files ... should I paste in the "debug" message? I am echoing @args to debug log from the ill-fated exec statement.

-- TWiki:Main.MatthewKoundakjian - 02 Apr 2007

This sort of debugging should better take place in TWiki's support web (TWiki:Support.WebHome) because if you describe a problem there the form would ask questions:

  • What is your server OS? I'd guess it is some sort of Windows (ah no, from the config I see it is Irix), where the "arglist too long" has been frequently observed. Anyway, a workaround is to shorten the path to your TWiki installation in cygwin's file space. Another try is to reduce the number of $maxTopicsInSet in lib/TWiki/Store/RcsFile.pm (recent SVN versions have it in lib/TWiki/Store/SearchAlgorithms/Forking.pm).

-- TWiki:Main.HaraldJoerg - 03 Apr 2007

I'll look at the $maxTopicsInSet var. I'm out of the office at present so I can't do much. It does seem promising. The TWiki web was problematic, as was doing an all-webs search.

It is Irix and I don't know what the limit on the arg list is. It makes me wonder if it is OS bound or shell bound. I don't know whether it's practical, but since fgrep and egrep are capable of reading a file, I could dump to a file, run egrep or fgrep and then del the file. Or, some kind of pipe rather than an exec and use egrep or fgrep's file option with "-" for stdin.

What's weird to me is why it barfs where it does; it seems like an unimportant line. I don't really know what the code is doing, though, and so I should be careful to not clobber too much.

Perhaps it is time to move off of Irix to Linux. It be nice to have a bit more speed than that machine is capable of.

As far as the port issue, I am still at a loss for why I get :8080:8080 in URLs. I did a quick find+grep to see if I could find where that might be happening. There is nowhere that the port is a variable, except for the one "base" url for twiki in the configure script.

Tell me this, is the value supposed to be the location of the twiki dir? I have http://hal:8080/ but would be it right to make it http://hal:8080/twiki/ (recall that my path to view is http://hal:8080/twiki/bin/view/)??

-- TWiki:Main.MatthewKoundakjian - 03 Apr 2007

I found the var in http://svn.twiki.org/cgi-bin/viewvc.cgi/twiki/trunk/lib/TWiki/Search.pm?revision=3248&view=markup ... I don't know how that corresponds to my install; I'll look in the locations you mentioned.

I may have to go a lot smaller than 512.

One thing ... I can't add a comment; I keep getting access denied type messages.

-- TWiki:Main.MatthewKoundakjian - 03 Apr 2007

Please move this debug to the Support web obn twiki.org. This DB is for tracking reports of bugs that we need to modify the core code or doc to fix. Once you have identified real bugs that are caused by TWiki, come back and add reports for them then.

Setting to no action.


Have still been trying to fix the darn thing and found this in http://search.cpan.org/src/LDS/CGI.pm-3.28/Changes Re Version 3.28

3. Fixed problem with url(-full) in which port number appears twice.

I'm running CGI.pm 3.27 ... so, CC, in your infinite wisdom, I think you were right to flush this one to "no action"

I'll know for sure once I get the darn thing updated. I keep getting errors like 'Can't locate object method "request" via package "Apache2::RequestUtil" at blib/lib/CGI/Carp.pm line 553.' when I try to install it, but I'll find a way to fix that too, I'm sure.

-- TWiki:Main.MatthewKoundakjian - 07 Apr 2007

Summary Template login on twiki running on apache at port 8080 acts strange
ReportedBy TWiki:Main.MatthewKoundakjian
Codebase 4.1.2
SVN Range TWiki-4.1.2, Mon, 26 Mar 2007, build 13227
AppliesTo Engine

Priority Urgent
CurrentState No Action Required


TargetRelease n/a

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatcfg LocalSite.cfg r1 manage 11.1 K 2007-04-02 - 19:21 MatthewKoundakjian  
Unknown file formatconf httpd.conf r1 manage 18.7 K 2007-04-02 - 19:12 MatthewKoundakjian my apache 2.x httpd.conf
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2007-04-07 - MatthewKoundakjian
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback