#foswiki 2016-10-25,Tue

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
FoswikiOnSlack1<mikeofmany> HTPasswdUser [00:05]
gac410An you are running 2.1.2 - current release? Are you running fcgi or mod_perl? [00:06]
FoswikiOnSlack1<mikeofmany> oh good question.. [00:08]
gac410There are a couple of password settings that may come into play with fcgi / mod_perl ... {Htpasswd}{GlobalCache} and {Htpasswd}{DetectModification} [00:09]
FoswikiOnSlack1<mikeofmany> 2.1.0 if I recall.. and fcgi [00:10]
gac410Both can be enabled with fcgi, so that the passwords file is cached in-memory. but very important to also enable DetectModification if the cache is enabled.
Or the fcgi processes may have different copies of the file.
[00:10]
FoswikiOnSlack1<mikeofmany> hmmm, thanks I can look into those. [00:12]
gac410we use this on foswiki.org, so it's pretty thoroughly tested. [00:12]
FoswikiOnSlack1<mikeofmany> Thanks. [00:13]
<mikeofmany> Huh, {Htpasswd}{GlobalCache} isn’t enabled.
<mikeofmany> {Htpasswd}{DetectModification} also is not enabled.
[00:19]
gac410okay. So that's not the issue. It does say that for every web transaction, the .htpasswd file is re-read. [00:20]
FoswikiOnSlack1<mikeofmany> Yes.
<mikeofmany> It would be easier if it was more than one out of 20 ish but it’s only the one guy
[00:20]
gac410I think the lock code is reasonable solid. unless you have the .htpasswd file on a nfs file sstem.
Nothing strange with manual edits of that file is there.
[00:21]
FoswikiOnSlack1<mikeofmany> Yeah, nothing strange, file type is ext3 [00:22]
gac410pretty vanilla then. strange.
All I can suggest, is dump a copy of ,htpasswd. have the user reset the password, and then compare the files. The entry should have changed, obviously... save another copy. When the password stops working, compare the files again.
Won't fix the problem, but might provide some clues about what's going on.
[00:23]
FoswikiOnSlack1<mikeofmany> I was going to dump their account and have them recreate it when they get back.
<mikeofmany> gac410 Thanks for the help again.
[00:25]
gac410The .htpasswd file is a relatiive straightforward format. Apache standard, BUT with the addition of the :email@addresses
WikiName:<password_hash>:email
[00:25]
FoswikiOnSlack1<mikeofmany> Yeah, noticed [00:26]
gac410If you are using fcgi, I'd suggest enabling those two settings - global cache, and detect modification. though for a small password file it probably doesn't make a huge difference.
hm.. I saw one user who had a "magically reverting" file after edit. It was some OS provided file watcher that detected/prevented modifications on critical files. I don't recall what the package was.
It was restoring their LocalSite.cfg after they edited it.
[00:28]
FoswikiOnSlack1<mikeofmany> I know things like tripwire can do that.
<mikeofmany> Luckily I don’t think we have that running on the directory where foswiki is installed but I can double check.
[00:29]
gac410Y, I just don't recall now what it was. but it sure generated a boatload of confusion ;) [00:30]
FoswikiOnSlack1<mikeofmany> or see if it’s something with their login. as others don’t have this problem.. hmm
<mikeofmany> Ugh. thanks again, I’m off for tonight
[00:30]
gac410okay good luck. I even less understand why it would impacto one user .. unless someone is playing games.
events.log will have resetpassword events logged.
[00:31]
........ (idle for 39mn)
vrurggac410: Hi, are you still around? [01:12]
gac410hi vrurg .. yes I'm here. [01:12]
vrurgI've finally got time to look at json issue. You shall use postData key of engineParams => initialAttributes whith createNewFoswikiApp.
It still doesn't work but this time it fails with 'unknown handler' error.
[01:13]
gac410okay. postData or POSTDATA ? [01:14]
vrurgpostData. This is an attribute name, not HTTP param. [01:14]
gac410Ah... okay
gac410 is still very confused on what to put where in the createNewFoswikiSession Find examples with conflicting use.
[01:15]
vrurgThe rule of thumb: use engineParams as much as possible.
Request initializer was designed for survining login events but it doesn't work well enough.
[01:16]
gac410Okay. Also when creating a newFoswiki... Where to query params go? How do i set "defaultWeb", "topic", etc. [01:18]
vrurgMay require additional tuning, I guess. As with postData – currently Request::JSON fetches it from the engine to parse the JSON request. But request may have fetched it as POSTDATA field previously from initializer and this could be the preferred source. [01:19]
gac410POSTDATA is really a strange one. It's a pseudo query param, created by the posted data in the data segment of a POST iirc. [01:20]
vrurgWeb/topic better be defined with path_info. [01:20]
gac410you woudl never have a browser interaction with POSTDATA as a param, and really core should *never* expose it as a query param, except for the oddball jsonrpc iirc [01:21]
vrurgWe could take care of it but there must be clear roadmap of what and how should be done. My weak point here is the attempt to keep as much compatibility as possible – so, many strange decisions sneaked into the new code and perhaps became even stranger than before.
BTW, to better know what could be used in engineParams=>initialAttributes of createNewFoswikiApp you can seek in Foswiki::Engine::Test for all invocations of initFromEnv(). It is supplied with supported keywords.
[01:23]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Engine::Test [01:25]
gac410Okay great. Thanks
So there are 3 ways to get the URL in ... setUrl => uri => and path_info => ... which one of those is preferred?
[01:26]
vrurgOr read Foswiki::Engine doc. There're attributes like pathData, queryData, query- and bodyParams - they're initialized from initialAttributes. But I'm afraid the doc is lagging behind somewhat. [01:28]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Engine [01:28]
gac410okay. Ah... got the test to run and fail as you said. ... unknown Handler. But... The handler is registered in the "around setup... " Is that lost by the createNewFoswikiSession? [01:29]
vrurgpath_info is the clearest way for tests. Unless query params are required to be set. [01:29]
gac410So for query params ... what's preferred? [01:29]
vrurgYes, it's lost. New app – new life, nothing is inherited from the previous except for environment.
Actually setting both path_info and query_string is preferable as the easiest way. setUrl is there because for some compatibility (I don't remember what it was that I had to introduce it) and for testing URL parsing from ground off.
[01:30]
gac410Ah ha... okay. Where would you recommend registering those handlers then After creating the new app and before the handleRequest ... Er.. Nope. Still fails with unknon handler.
Strange. RESTTests registers the handlers *before* calling createNewFoswikiSession and that works there. ... going to try that now.
[01:32]
vrurgI'm rechecking it and yes, JsonRpcContrib doesn't use app to register handlers. Must work as-is. [01:35]
gac410Didn't work - calling register in the test, like RESTTests does.
In real life, it's not The contrib that registers the handlers. Its normally a separate plugin, like configurePlugin, etc.
[01:35]
vrurgRe-registering of handler _after_ createNewFoswikiApp works. Json server is now bound to the existing app in order to properly cleanup and reduce memory leaks. [01:43]
gac410okay I'll try that ... needs to be registered twice then? [01:44]
vrurgHandlers are registered on the Json server – so, they must be re-registered. Normally plugins wouldn't mention this because they're re-initialized with every new app instance created. It only affects tests.
No, just move it from set_up to after createNewFoswikiApp
There is another error pops up afterwards. Looking into it.
[01:44]
gac410hm Doesn't seem to work [01:44]
vrurgWorks for me. But now it is json_handler() of JsonrpcTests fails because it checks $session against 'Foswiki' class which is not correct. [01:46]
gac410gac410 must be getting something wrong. get the same error - "Invalid invocation - unknown handler for JsonrpcTests.simplehandler" no matter where I put the call to register [01:47]
vrurgI'll commit my changes in few minutes. [01:48]
gac410okay thanks. [01:48]
GithubBot[distro] vrurg pushed 1 new commit to Item13897: https://git.io/vPpTU
distro/Item13897 a3f81ed Vadim Belman: Item13897: Fixed JsonRpcContrib/JsonrpcTests test_simple_postdata().
[01:54]
***GithubBot has left [01:54]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [01:54]
vrurgOk, this works for me. [01:54]
gac410thanks vrurg ... testing now [01:54]
vrurgHope it does for you too...
NP
[01:54]
gac410yup.... works fine. You have the magic touch. I'll look it over and try to apply the lessons to the rest of the tests.
Thanks!
[01:55]
vrurgWelcome! Thanks to you. Sorry for being late with it but I was totally burried in another project – auto installation of modules from CPAN using cpanminus code. Have a hope that now it would be possible for any kind of hosted setup to install any module unless it's XS ano access to a compiler. [01:59]
gac410no problem. Cool interesting. [01:59]
vrurgPlus it would make it easier to do initial setup of Foswiki
For testing I installed a Mint in a VM with as minimal setup as possible. Today foswiki_debug.psi started normally after ~10-15mins of initial setup. Better than not running at all...
[01:59]
gac410cool [02:01]
vrurgHope so. It would an answer to Lavr problems with missing packages in a linux distro, I hope. Plus, with own cpan mirror it could be much easier for a company to maintain their own security-modified modules.
I will fill in a proposal on this and commit as a branch of 13897 though the module itself is totally independant and can be used with any Foswiki codebase.
[02:03]
gac410y, This will need some careful consideration. I know it's painful, but the whole cpan mess has been very painfully fought with over the years. [02:05]
vrurgIf it gets properly discussed we can solve the most problematic issues. One the problems with cpan modules is that they all install into same location. I decided to install them locally under $FOSWIKI_HOME/perl5 using local::lib. If anything goes wrong with it – just removed the dir and reinstall and see what happens.
Ok, time for late dinner. CU!
[02:09]
gac410cu. thanks [02:10]
SwervzHi ive been searching google for about 5 hours now and cant find a solution to the error Warning Foswiki is running in 'bootstrap' mode, which means that there is no existing configuration (LocalSite.cfg is missing or is unreadable) when trying to run /bin/configure.pl [02:24]
foswiki_irc5Hi
Could anyone please help me with ldap wikiname issue?
I see an "ugly" wiki name after user logs in
I went through this but it did not help
https://foswiki.org/Support/Question471#
[02:26]
Swervzthere are literally 0 results on google that seem to help with this :( [02:32]
gac410Are you running on a windows server? [02:32]
SwervzYeah with IIS
I added all the read/write permissions and made the files in bin writable
[02:34]
gac410I hate to say is Swervz ... we have not had a developer with IIS available in many years. I'm sure Foswiki 2.x was never tested on IIS. I have tried it under apache on an ancient WinXP system. But that's about the extent of it. [02:35]
Swervzhmm
it looks like a permissions problem but IUSR, Domain Users and IIS_IUSERS all have full control of the data, pub, working and lib folders
[02:36]
gac410The bootstrap warning is normal if LocalSite.cfg doesn't exist. Does configure come up at all?
Note that if bin/configure.pl is not working, it's possible to configure Foswiki from the command line. I have *no* idea if bootstrap actually functions on IIS. It is highly dependent on the environment it detects from the web server.
tools/configure -save will play 20 questions and create an initial configuraiton.
[02:45]
Swervzoh thanks Ill try that
I think iis supports bootstrap, ive seen bootstrap sites running on it
[02:48]
gac410No... bootstrap is not the bootstrap skin. It's just a bit of perl code in foswiki that tries to bootstrap aka "discover" the configuration. [02:49]
Swervzoh I see
rip now im getting Insecure dependency in sysopen while running with -T switch at C:/Perl64/site/lib/CGI/Session/Driver/file.pm line 107.
[02:49]
gac410Ah... don' t use Taint mode (-T option on perl ... That's actually a bug in CGI::Session that the upstream developers seem reluctant to fix.
Taint checking should be all disabled in Foswiki 2.x anyway. Unless you created a lib/LocalLib.cfg and enabled FOSWIKI_ASSERTS a debug setting.
[02:50]
SwervzI removed the -T option and now Im getting flush(): couldn't store datastr: store(): couldn't open 'C:\foswiki\wwwroot\working\tmp\cgisess_19b837994f3e659c8f151c27ae4d822f': Permission denied at C:/foswiki/wwwroot/lib/Foswiki/LoginManager.pm line 721. [02:52]
gac410I don't know much at all about Windows file permissions. On linux we'd say to run the tools under the web server user.
Are you running tools/configure ??? (not bin/configure!) tools/configure should not be createing CGI sessions
[02:53]
Swervzoh I was running /bin/configure.pl
in a web browser
[02:56]
gac410Oh... well that should work too.
bin/configure in web browser is correct. But the web server really ought to be able to write session files. No idea there on permissions.
tools/configure from command line is an alternate way to configure foswiki.
https://foswiki.org/System/InstallationGuide#Configuring_Foswiki_manually_40without_using_the_61configure_61_page_41
[02:57]
SwervzI think that's exactly what IIS_IUSRS is, the webserver is IIS and IIS_IUSRS has full control [02:59]
gac410well working\tmp\cgisess_* files are the storage of users session data. Web sever cgi scripts must be able to read/write working/tmp. (but never from the web!) [03:00]
SwervzIm honestly just thinking of giving in and setting up a linux vps just for this
Id have to buy more ips though
[03:03]
gac410We do have a VM image with foswiki already installed / configured for testing anyway. [03:04]
Swervzfor linux? [03:04]
gac410It's a vmware image - ubuntu 16.04 LTS with Foswiki 2.1.2 [03:04]
Swervzoh nice
there are cgisses_* files in working\tmp\ which is odd
[03:04]
gac410If you have a copy of your server error log ... It would be really interesting to see the bootstrap messages (Log messages starting with AUTOCONFIG: [03:05]
Swervzsure let me get that [03:06]
gac410http://pastebin.com
Just make a short lifetime posting - an hour, and I'll pull it down and review it ... see if we can fix anything to make bootstrap work better on iis.
I've got a bunch of bootstrap changes in the queue for 2.1.3
[03:06]
Swervzhttp://pastebin.com/kMSnMWe5
I think at the start of that log you may see some permission errors, those where from earlier before I fixed the permissions
[03:07]
gac410No AUTOCONFIG messages ...
Did a LocalSite.cfg get created somehow?
[03:08]
Swervzthere is a LocalLib.cfg in \bin no localsite.cfg though [03:10]
gac410LocalLib.cfg is manually created in bin. LocalSite.cfg would exist in the "lib" directory, not bin. [03:11]
SwervzYeah there isnt one in lib either [03:11]
gac410This is what the bootstrap messages would look like: http://pastebin.com/47RGGdxJ
(10 minute visibility)
[03:14]
SwervzHere's a screenshot of the config page if it helps http://i.imgur.com/YKpy7bH.png
oh yeah my logs look nothing like that
[03:14]
gac410Okay. That hints that the "jsonrpc" script is not working. (or jsonrpc.pl). ...
The configure page is actually all javascript driven ... and populated using ajax and jsonrpc.
Either that or your browser did not get and execute the javascript and css.
But even the configure.pl should cause a bootstrap when LocalSite.cfg does not exist.
[03:15]
Swervzhmm
I really appreciate you helping btw, I was kindof going mad trying to fix this myself
[03:16]
gac410Unfortunately it's been really tough to find dev's interested in iis. I'm retired / volunteer dev. Just don't have it in me to go spend $$$ to get a MS server setup.
I do all my development on a linux laptop.
Generally things that require expenditure depend on a business hiring a consultant to do the work,
[03:19]
SwervzI guess Id need to know perl to help out with iis development eh? [03:20]
gac410Everyone has to start somewhere :)
(That bootstrap I posted was a new PSGI/Plack "bleeding edge" version btw. You won't see anythign about psgi, etc in a released foswiki
Forgot which version I had checked out from git.
Back to Confgure, if you use something like firefox net trace, or chromium ... you should make sure that any files from yoursite.com/pub/... (the css and js) are being loaded okay
They are served as static files by the web server, independent of foswiki
Or make sure you can get to a file like /pub/System/ProjectLogos/favicon.ico ...
If that works, then the css & js should be readable.
[03:20]
SwervzIm on the net tab in firebug and its completly blank [03:29]
gac410Hm If you reload the page doesn't it show the requests?
I use it all the time.
[03:30]
Swervzoh I had to refresh it a couple of times
now everything 404d
except configure.pl
this has never happened before
[03:31]
gac410Okay. So that then explains the essentially blank configure screen. ... and probably goes back to bootstrap.
Bootstrap attempts to figure out how to find pub, relative to bin. 2.1.2 uses bin/../pub (yech) ... 2.1.3 will hopefully have a better way.
[03:32]
Swervzoh I went through all the files in bin and added this # @INC = ( '.', grep { $_ ne '.' } @INC ) unless $binDir;
unshift @INC, "C:/foswiki/wwwroot/bin/";
[03:34]
gac410I think the best way to proceed is to give up on the web interface (for now) ... and use tools/configure -save from the command line and let it play 20 questions - it will ask you what your url paths loo like [03:34]
Swervzcommented out the original line, do I need unless $binDir? [03:34]
gac410Hm No. That unless $binDir is used to put "." (current directory) into the path. [03:35]
Swervzah [03:35]
gac410But foswiki *should* be able to find the bin directory. You should not have needed to do the unshift. But, doesn't hurt anything. and if it helps, can't argue with success. [03:36]
***ChanServ sets mode: +o Lynnwood [03:36]
Swervzokay Ill try the command line tool [03:38]
gac410*hopefully* that works :D [03:38]
SwervzOh hey, looks like I got the AUTOCONFIGS when I started it [03:38]
gac410Yes, tools/configure has to run it too, but only the "phase 1" - the non-web related stuff. Phase 2 - figuring out URLs, etc isn't possible from the shell. [03:39]
Swervzawesome I got it configured now I think, Im logged in at /bin/view.pl/Main/WikiUsers so I must be
Just no css or anything again
[03:45]
gac410Hm So either you set the PubUrlPath incorrectly, or the web server is not allowing access to the pub directory
Need to chase down any 404's and figure out if it's the request, or the server.
bin/configure.pl will not be functional without css/js. But you can use tools/configure to change the config, or just edit the file.
[03:46]
Swervz$Foswiki::cfg{PubDir} = 'C:/foswiki/wwwroot/pub';
$Foswiki::cfg{PubUrlPath} = '/foswiki/pub';
I guess that should jus tbe .pub
./pub*
[03:48]
gac410yes. so tools/configure -save -set {PubUrlPath} ='/pub'
... /pub not ./pub*
[03:49]
SwervzI just added the period becuase my irc client thinks its a command, star was a typo sorry [03:50]
gac410okay. I just went through the same thing :D [03:51]
Swervzooh now Im getting 403 forbidden so I think its a permission issue [03:51]
hmm I think this is becuase the application pool identity doesnt have access to the folder
aw I thought that would fix it
[03:57]
gac410sorry, but for IIS and Windows I'm a fish out of water. [04:01]
Swervzoh I think its still requiring ssl for that folder or something
I disabled require ssl for the site I guess it just didnt inherit
normally it does
[04:02]
.... (idle for 18mn)
I feel like this is a .htacess issue [04:21]
gac410hm I don't know IIS, but for apache, if you have access to the server configuration, usually .htaccess configuraion is not recommended. [04:22]
Swervzohh I see what I did [04:28]
I thought $Foswiki::cfg{PubUrlPath} was relative to the install directory
I have fos wiki in /wiki/ on my domain so I set PubUrlPath to /pub
it was trying to load the images from website.net/pub and not website.net/wiki/pub
[04:33]
gac410No, PubUrlPath is whatever you want in the URL. If you want "http: //yoursite.com/wiki/bin/view ... and yoursite.com/wiki/pub " Then PubUrlPath is /wiki/pub and ScriptUrlPath is /wiki/bin
Most sites want the shortest URL possible. So prefixes like /wiki/bin or /foswiki/bin ... etc... are used when sharing the hostname with other software
hostname.com/wiki hostname.com/blog/ ... etc
It's pretty flexible ...
[04:34]
Swervzyeah I set them both to /wiki/pub and /wiki/bin and it fixed it [04:36]
gac410Ah great. [04:36]
Swervzsorry its late [04:36]
gac410yeah. I'm on east coast to well past midnight. Time to go for me actually. [04:37]
Swervzokay, thankyou for all the help
Ill try and re-write the documentation some time
[04:37]
gac410great thanks. And if you ever get a chance to figure out where the bootstrap AUTOCONFIG messages disappeared to, those would be very helpful. Thanks, and goodnight [04:44]
***gac410 has left [04:44]
................... (idle for 1h33mn)
ChanServ sets mode: +o CDot [06:17]
............... (idle for 1h12mn)
GithubBot[WebDAVLinkPlugin] cdot pushed 1 new commit to master: https://git.io/vPplE
WebDAVLinkPlugin/master 76d5878 cdot: Item14106: Missing . spotted by Dan Nordin
[07:29]
***GithubBot has left [07:29]
FoswikiBothttps://foswiki.org/Tasks/Item14106 [ Item14106: Firefox extension not working ] [07:29]
...................... (idle for 1h49mn)
GithubBot[WebDAVLinkPlugin] cdot pushed 1 new commit to master: https://git.io/vPpwQ
WebDAVLinkPlugin/master 6dce075 cdot: Item14106: Converted firefox add-on to a full listin in Mozilla add-ons
[09:18]
***GithubBot has left [09:18]
FoswikiBothttps://foswiki.org/Tasks/Item14106 [ Item14106: Firefox extension not working ] [09:18]
...................................... (idle for 3h5mn)
***ChanServ sets mode: +o CDot [12:23]
....... (idle for 31mn)
ChanServ sets mode: +o Lynnwood [12:54]
.............................................. (idle for 3h48mn)
ChanServ sets mode: +o CDot [16:42]
........................................................... (idle for 4h52mn)
ChanServ sets mode: +o gac410 [21:34]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)