Re: Doing Authorization using mod_perl from a programmersperspective
From: Jon Robison [EMAIL PROTECTED] What about sockets? I am in the middle of trying to use $c = $r-connection and $c-remote_addr as part of the cookie name. (So far I am having trouble with the fact that remote_addr returns packed info, and I am still searching for how to unpack it - if you know, tell me!). It's not 'foolproof', but how many casual cookie stealers can force their browser to use a particular socket? How would this be effective? If multiple users are behind a firewall that uses NAT, they will all have the same remote IP address. As for the remote port, that changes from connection to connection so it's not possible to use it as a reliable indicator either.
[OT] Redirect w/ Netscape browser causing 'Document contains no data'
I seem to have a strange problem here with Netscape displaying the error 'Document contains no data' when I do $Response-Redirect($location). I'm using Apache 1.3.19, mod_perl 1.25, Apache::ASP v2.09, but I don't think it's in Apache::ASP, as the redirect code in there looks pretty much the same as what is recommended in the guide. We have a front-end proxy configuration that also has mod_proxy_add_forward installed, but that was only added recently and I've been trying to track this problem down for a little while. Looking at the logs, both the frontend and backend servers are logging a status code of '302', with '0' bytes transferred - just like I would expect it to. If I go directly to the backend server, it makes no difference, either. It also doesn't seem to make any difference if I buffer output or not. All of this, of course, works just fine in IE. I've got a work-around (ugly) by putting META HTTP-EQUIV=refresh CONTENT=0 ;URL=$location but I'd really like to get rid of that. Anybody have any ideas? Daniel. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Daniel Little Metrex Systems Inc.[EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RE: [ANNOUNCE] Cache-Cache-0.03
DeWitt, Have you though about making SharedMemoryCache flush to disk if it becomes full but before it's time to expire the data? I've done a lot of thinking about a multi-layered cache implementation. The API would be the same, but it would be clever about using MemoryCache - SharedMemoryCache - FileCache to make read access to data super efficient, and only persist outward on writes. Along the same lines, how about making SizeAwareMemoryCache as well so that you can specify just how much data you want stored in the cache. I haven't really thought about the implications of this but it seems to me that it would be a useful extension. Memory's normally tighter than disk space. And being in a mod_perl server environment where you have large chunks of memory already used for the web server, it would be good to keep a handle on the cache growing too large. I suppose you get a similar effect from just keeping the timeout short but I'm thinking of a scenario where it's valuable to keep the data for a very long time, so long as I know that I'm not using all available memory in the process. Daniel. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Daniel Little Metrex Systems Consulting Inc. [EMAIL PROTECTED] 210-294 William Ave. Tel: (204) 940-4553 Winnipeg, MB.,Cel: (204) 955-0300 Canada, R3B 0R1 Fax: (204) 487-6680 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RE: [ANNOUNCE] Cache-Cache-0.03
Perrin, "Daniel Little (Metrex)" wrote: Along the same lines, how about making SizeAwareMemoryCache as well so that you can specify just how much data you want stored in the cache. Sounds like Joshua Chamas' Tie::Cache module. It provides a size-limited LRU cache. Indeed! Thanks for the tip! Just installed it and it looks like it fits the bill perfectly. Daniel.
Apache::ASP/Solaris 2.7 - session locking issues
Has anyone had any problems with failure to write locks on Apache:ASP under Solaris or any other platform? Getting quite a number of the following in the log files... [Tue Nov 7 10:23:11 2000] [error] [asp] [6708] [error] can't write lock /usr/apache/asp.global/.state/57/57d8991eb40ed4d6e886304ac5806101.l ock: Bad file number, /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 4670 ...but not very consistent. Most of the time, it works just fine. When it does fail, it seems to trigger a bug in the UnLock module in that the global $UNLOCK value gets set to LOCK_SH|LOCK_EX (which is invalid) in the code that is commented as being written for QNX. For some reason, Fcntl::FUNLCK is returning LOCK_SH|LOCK_EX on Solaris, and the next time the module attempts to unlock a lock file, the call to flock($file, ($UNLOCK || LOCK_UN)) [line 4687 or thereabouts] fails with an 'Invalid argument' error. Anyway, ending up with some really weird issues using ASP on Solaris. We have one code base for a client that is used on both NT and Solaris (spent a fair bit of time getting that to work). But now, even some form values in the Solaris version appear to be getting corrupted somehow. For some unknown reason, a form that is submitted is getting a key value that is not at all what is in the form - it almost appears to be coming from another instance of the same form from another user on the system at the time. We're using the latest version of the ASP code so if anyone has any ideas, it would be most useful. Thanks in advance! Daniel. begin:vcard n:Little;Daniel fn:Daniel Little tel;cell:(204) 955-0300 tel;fax:(204) 487-6680 tel;work:(204) 837 5503 url:http://www.metrex.net org:Metrex Systems Consulting Inc.; version:2.1 email;internet:[EMAIL PROTECTED] title:President end:vcard
Re: Apache::ASP/Solaris 2.7 - session locking issues
From: "G.W. Haywood" [EMAIL PROTECTED] On Tue, 7 Nov 2000, Daniel Little wrote: Has anyone had any problems with failure to write locks on Apache:ASP under Solaris or any other platform? I just grepped one of my logfiles (a small one, about 70 megabytes:) and there was no occurrence of this message. Linux 2.2.16, Perl 5.6.0, Apache 1.3.12, mod_perl 1.24, ASP 0.19 (yes, 0.19). I did it on this log because it's the only server (in development) I've got which is running 5.6.0. There are only two things different to that on our environment - ASP 2.03 (instead of 0.19 - ouch!) and Solaris 2.7 (instead of Linux 2.2.16). All the rest are the same (and we're on a Sparc - I presume yours is Intel?). Solaris does funny things sometimes, but I think Josh might have something to say about this one if you're patient. Sure, I can wait for Josh's response. We had to backout our Solaris version this A.M. due to these problems. Note, we did find the problem with the form variables that were just showing up as plain incorrect. All I can say is 'use strict;' - it pays. I had some difficulties with 'use strict;' on NT about a year ago and when we moved the platform to UNIX, had a number of issues around variables getting clobbered, getting lost entirely, etc., and switching to using strict with all variables assigned in the ASP script solved the problems. I guess that's what I get for practicing unsafe code practices... ;) Anyway, thanks for the response. I think we're going to have to build a load test platform to reproduce the bugs without going live. Most of these problems did not show up in more than three months of testing the environment. Sigh. Daniel. begin:vcard n:Little;Daniel fn:Daniel Little tel;cell:(204) 955-0300 tel;fax:(204) 487-6680 tel;work:(204) 837 5503 url:http://www.metrex.net org:Metrex Systems Consulting Inc.; version:2.1 email;internet:[EMAIL PROTECTED] title:President end:vcard