ANNOUNCE:: Apache::ProxyStuff-0.10
Revision history for Perl extension Apache::ProxyStuff. 0.10 Sat Oct 21 01:09:00 2000 - ProxyStuff now adds a /BODY tag when the document does not contain one which should result in all pages receiving a footer even if they are not syntacticly correct -FW: [EMAIL PROTECTED]- Date: Sat, 21 Oct 2000 08:16:54 +0200 From: PAUSE [EMAIL PROTECTED] To: Jason Bodnar [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: CPAN Upload: J/JB/JBODNAR/Apache-ProxyStuff-0.10.tar.gz The uploaded file Apache-ProxyStuff-0.10.tar.gz has entered CPAN as file: $CPAN/authors/id/J/JB/JBODNAR/Apache-ProxyStuff-0.10.tar.gz size: 6232 bytes md5: e2184258e7fb03903a59ddf08e44b140 No action is required on your part Request entered by: JBODNAR (Jason Bodnar) Request entered on: Sat, 21 Oct 2000 06:15:33 GMT Request completed: Sat, 21 Oct 2000 06:16:54 GMT Virtually Yours, Id: paused,v 1.69 2000/10/16 16:19:25 k Exp k --End of forwarded message- -- Jason Bodnar [EMAIL PROTECTED]
Bizarre Perl Sections Problem
I'm having a really strange (in my opinion) problem with Perl sections and using the Apache::ReadConfig namespace explicitly (qualifying variables, like %Apache::ReadConfig::Location). Here's what I'm doing: I have a small library of routines; I'm using PerlRequire to load that library. In a Perl section, I'm then calling a routine from that library that should alter %Apache::ReadConfig::Location. When I dump out the ReadConfig namespace, though (using PerlSections-dump), there's nothing in %Location. *However*, and this is the weird part, this only happens if I don't have a Perl section before the PerlRequire statement. This will be demonstrated below. I have a small test case. Here's the library, called 'foo.pl': package Foo; sub bar { $Apache::ReadConfig::Location{"/foo"} = { Options = 'ExecCGI', }; } 1; Here's the relevant portion of my httpd.conf, where the PerlRequire is before the first Perl section: PerlRequire conf/foo.pl Perl use Apache::PerlSections; Foo::bar(); print STDERR Apache::PerlSections-dump; /Perl Here's the output of starting up the webserver with that configuration file (I compiled with PERL_TRACE on): PerlRequire: arg=`conf/foo.pl' attempting to require `conf/foo.pl' loading perl module 'Apache'...ok loading perl module 'Apache::Constants::Exports'...ok loading perl module 'Tie::IxHash'...ok perl_section: /Files perl_section: /Directory perl_section: /Files perl_section: /Directory perl_section: /VirtualHost perl_section: /Location perl_section: /Location loading perl module 'Apache'...ok loading perl module 'Tie::IxHash'...ok package Apache::ReadConfig; #scalars: #arrays: #hashes: 1; __END__ perl_section: /Files perl_section: /Directory perl_section: /Files perl_section: /Directory perl_section: /VirtualHost perl_section: /Location perl_section: /Location Nothing in the Apache::ReadConfig namespace, as you can see. Now, here's the *working* webserver configuration, with a (blank) Perl section coming before the PerlRequire: Perl /Perl PerlRequire conf/foo.pl Perl use Apache::PerlSections; Foo::bar(); print STDERR Apache::PerlSections-dump; /Perl And here's the output: loading perl module 'Apache'...ok loading perl module 'Apache::Constants::Exports'...ok loading perl module 'Tie::IxHash'...ok perl_section: /Files perl_section: /Directory perl_section: /Files perl_section: /Directory perl_section: /VirtualHost perl_section: /Location perl_section: /Location PerlRequire: arg=`conf/foo.pl' attempting to require `conf/foo.pl' loading perl module 'Apache'...ok loading perl module 'Tie::IxHash'...ok package Apache::ReadConfig; #scalars: #arrays: #hashes: %Location = ( '/foo' = { 'Options' = 'ExecCGI' } ); 1; __END__ perl_section: /Files perl_section: /Directory perl_section: /Files perl_section: /Directory perl_section: /VirtualHost perl_section: /Location perl_section: Location /foo Options ExecCGI (OK) Limit=no perl_section: /Location In other words, it works as expected when the blank Perl section is added before the PerlRequire. So what seems to be happening--and I don't know the internals side of this, so I'm just making guesses--is that the first Perl section initializes the Apache::ReadConfig namespace, including the %Location hash. Without this initialization, an explicit use of %Apache::ReadConfig::Location seems to be... broken. And that's as far as I can go with it. :) So what I'd really like, if possible, is an explanation for this behavior; adding the blank Perl section seems to provide a useable workaround, but I'd like to know *why* this is happening. Thanks all. bye, Benjamin Trott
IPC::Shareable (was Re: Perl module - LWP)
"David M. Davisson" wrote: Yes, it works fine. No mods. From: "David Jourard" [EMAIL PROTECTED] Has anyone worked with the LWP module under mod_perl and have they found that it works with no modification. I would like to ask the same question about IPC::Shareable. Is anybody successfully using it under Solaris or OpenBSD? "make test" hangs for me on these platforms and the module author is unreachable :-( http://vorpal.mcs.drexel.edu/bsd-ports/helix/shared-memory.html doesn't seem to help on OpenBSD (increasing SHMMAXPGS up to 4096) If not IPC::Shareable, what module do you use for fast communication between Apache-children?
Re: IPC::Shareable (was Re: Perl module - LWP)
"Alexander Farber (EED)" wrote: "David M. Davisson" wrote: Yes, it works fine. No mods. From: "David Jourard" [EMAIL PROTECTED] Has anyone worked with the LWP module under mod_perl and have they found that it works with no modification. I would like to ask the same question about IPC::Shareable. Is anybody successfully using it under Solaris or OpenBSD? "make test" hangs for me on these platforms and the module author is unreachable :-( http://vorpal.mcs.drexel.edu/bsd-ports/helix/shared-memory.html doesn't seem to help on OpenBSD (increasing SHMMAXPGS up to 4096) If not IPC::Shareable, what module do you use for fast communication between Apache-children? IPC::ShareLite is writen in C (and hence faster (arguably)), but it does not serial data structures, so either Freeze / Thaw or DataDumper are you friends here. I've seen IPC::Sharable working ok on Solaris 2.6 but cannot offer any guideance as to why it may not work. Greg
File Space Usage ... in perl ?
Hi, I'm wondering if there is a way to get exactly the same result of system fonction "du" in Perl. I need to know the disk Space tooken by a directory and it's sub-directory. To do that, I used the find method in File::Find to get the size (using -s file test) of each file and dir in a directory, recursivly. But the size I get is never the same as du ... why ? Both give a result in bytes, shouldn't it be the same ? #!/usr/bin/perl -w use strict;use File::Find; ###Subs ...## sub MyTraverseFolder # # Recursive Function#sub MyTraverseFolder($) { my $dir = shift; my $wanted = shift; find($wanted, "$dir");} ## sub getsize()## modify the $main::size_value variable to add it the current # File::Find::name 's size in bytes;#sub getsize() {my $_size = -s $File::Find::name; $main::size_value += $_size; # debug it ... print sprintf("%d",(-s $File::Find::name)),"\t$File::Find::name\n";} ###Main ...# $main::size_value = 0; MyTraverseFolder("$ARGV[0]",\getsize);print "Total size: [",sprintf("%d",($main::size_value)),"] \n"; For example on /etc , su gives 3552 kB, mydu gives 2882 kB !!! I did not find any module that was doing the du function . THanks for your help Fred
Re: [ RFC ] New Module Apache::SessionManager
Greg Cope wrote: Dear ALL I've writen a module that does transparent session management via either Cookies, Munged URI or Query Args. It has quite a few options to change the behavour, and appears stable in my developement environment. What I suggest is that unless there is a major objection I call it Apache::SessionManager and set up a Source Forge project with the same name. Unless there is a major issue I assume that by the weekend everyone whom wants to will have made thier view clear and will hopefully go forward from there. Regards Greg Dear All Not having heard anything bad about this I will go ahead a setup a sourceforge project. I also hot heard anything back from the poeple I sent a copy to, I can hence only assume that its so good that it's made them speachless ;-) Seriously, could poeple drop me a note as to how they found it ? I do not want to go to all the trouble of writing docs / install files / source forge projects etc ... if its a load of rubbish and I am wasteing my time. Regards Greg Cope
Re: File Space Usage ... in perl ?
Dear Fred, without testing it, just some ideas. Try to exchange: To be on the safe side: my $_size = -s $File::Find::name; my $_size = -s $File::Find::fullname; To count links in: find ( $wanted, "$dir" ); find ( { wanted = $wanted, follow = 1 }, $dir ); Check out via telnet: du /etc du -L /etc And the results may be different, if you are logged in as root or if you run your program as user nobody because of access rights. Ernest -- Yours sincerely Mit freundlichen Grüßen Ernest Lergon VIRTUALITAS Artists online, Fine Arts online, Poets online http://www.virtualitas.com/
Re: How to use gcc to build mod_perl
Hi all, On Fri, 20 Oct 2000, Rob Tanner wrote: BEWARE: The modperl build picks up the CC variable value from the perl build. I don't know whether that was done simply as a matter of convenience (i.e., the perl build process thoroughly tested the compiler for the required capabilities so why redesign the wheel) or whether there's some necessity that modperl be built with the same compiler. Perl and mod_perl must be built with the same compiler. It's documented. 73, Ged.
Re: @INC and use
Hi there, On 20 Oct 2000, Stephen A. Cochran wrote: I've been porting a CGI to mod_perl, and had it working. Then last night mod_perl and apache were upgraded and recompiled and it stopped working. :( From the mod_perl guide: (http://perl.apache.org/guide/porting.html#Reloading_Modules_and_Required_F), it looks as if the use statment is only effective during compile time, and the @INC is reset to normal, which wouldn't include this path. Am I understanding this correctly? Yup. I'm curious why it was working in the first place. Curiosity killed the cat. It was probably a bug. 73, Ged.
Re: File Space Usage ... in perl ?
See http://testwww.ethz.ch/source/my_scripts_collection/duu for a script of mine calculating directory sizes (it's like du but more eye friendly, it displays the subfolders sorted after their size). Its not the same thing, as it uses du to calculate the size of each subfolder, but I've had the same issue regarding blocks vs. bytes. du displays used blocks, not real sizes. christian.
Building on MacOS X (Darwin)?
Hi all, I figured I'd try to build mod_perl on MacOS X Public Beta (Darwin), and ran into a couple of snags. Thought I'd check whether others have had success. I haven't yet tried recompiling Perl from source, so that's probably the next step. During 'perl Makefile.PL' I get lots of errors from Net::Domain, like this: Unknown option: 1 Usage: head [-options] url... -m method use method for the request (default is 'HEAD') [...blah blah blah] Then during 'make' it seems to go fine for a long while, but then chokes here: === modules cc -c -I./os/unix -I./include -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE -I. -I../.. -DUSE_PERL_SSI -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -DMOD_PERL modules.c cc -c -I./os/unix -I./include -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE -I. -I../.. -DUSE_PERL_SSI -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -DMOD_PERL buildmark.c cc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE -I. -I../.. -DUSE_PERL_SSI -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -DMOD_PERL\ -o httpd buildmark.o modules.o modules/perl/libperl.a modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a `perl /Users/ken/modperl/src/modules/perl/ldopts ` /usr/bin/ld: Undefined symbols: _actions_module _include_module _log_config_module make[1]: *** [target_static] Error 1 make: *** [apache_httpd] Error 2 ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
simple cookie authorization?
Is there a module for simple cookie authorization? I want to grant access if the user has a cookie set. I don't care about the value of the cookie. I looked at Apache::AuthCookie and it looks overly complex for my needs. -- Jason Bodnar [EMAIL PROTECTED]
Re: simple cookie authorization?
Jason Bodnar [EMAIL PROTECTED] wrote: Is there a module for simple cookie authorization? I want to grant access if the user has a cookie set. I don't care about the value of the cookie. I looked at Apache::AuthCookie and it looks overly complex for my needs. Something like the following? package My::CookieAuth; use strict; use Apache::Constants qw(:common); use CGI qw(:standard); use CGI::Cookie (); sub handler { my $r = shift; return DECLINED unless cookie(COOKIE_NAME); return OK; } __END__ In httpd.conf, you will need to set this as the PerlAuthenHandler for the protected files/directories and `require any' to get Apache to actually call it. This is not the most efficient, but it could be a starting point for what you're looking for, if I understand what you're looking for. -- James Smith [EMAIL PROTECTED], 979-862-3725 Texas AM CIS Operating Systems Group, Unix
Re: [ RFC ] New Module Apache::SessionManager
Check out Apache::Session, available on CPAN and see if your code could be moulded to fit it's way of thinking. If they are too much different, then you might want to consider contacting the module list to see if what you have is a good name (it probably is) before going all out with distribution (and consider CPAN). For more information, http://www.cpan.org/modules/00modlist.long.html#Part1-Modules:C Greg Cope [EMAIL PROTECTED] wrote: Greg Cope wrote: Dear ALL I've writen a module that does transparent session management via either Cookies, Munged URI or Query Args. It has quite a few options to change the behavour, and appears stable in my developement environment. What I suggest is that unless there is a major objection I call it Apache::SessionManager and set up a Source Forge project with the same name. Unless there is a major issue I assume that by the weekend everyone whom wants to will have made thier view clear and will hopefully go forward from there. Regards Greg Dear All Not having heard anything bad about this I will go ahead a setup a sourceforge project. I also hot heard anything back from the poeple I sent a copy to, I can hence only assume that its so good that it's made them speachless ;-) Seriously, could poeple drop me a note as to how they found it ? I do not want to go to all the trouble of writing docs / install files / source forge projects etc ... if its a load of rubbish and I am wasteing my time. Regards Greg Cope -- James Smith [EMAIL PROTECTED], 979-862-3725 Texas AM CIS Operating Systems Group, Unix
Re: simple cookie authorization?
From: "Jason Bodnar" [EMAIL PROTECTED] JB Is there a module for simple cookie authorization? I want to grant access if JB the user has a cookie set. I don't care about the value of the cookie. Sounds like you just need vanilla cookie access. Have a look at: http://search.cpan.org/doc/LDS/CGI.pm-2.74/CGI.pm Then search on: HTTP COOKIES Rodney Broom
Re: A question on Macs
Hi John, The MAC OS's range from 8.1 - 8.6. The main problem before we turned keepalive off was that the applications took much longer to load than the PC, in many cases we're talking minutes not seconds. And then depending on the Browser there are numerous other problems. For instance, we use onMouseDown handlers to simulate the pressing of a button using images. For the MAC on Netscape Communicator/Navigator 4.xx, for each of these "buttons" to work, it needs to be 'pre clicked' before its action is performed. I think the onMouseDown image needs to loaded before the button will work correctly. In I.E. 5.0 (2022), it seems like our Javascript files are not being loaded fully. We get a lot of 'Foo is not an object' type errors. It makes I.E. unusable. Sometimes it just returns a blank screen. A couple of the application use Object Oriented Javascript in hidden frames, a convenient way to store data on the client. Because of this, there is a price to pay when one of these applications first loads. Part of the problem for both applications is when the 'state' of the application is does not change correctly causing a myriad of other problems. When the user selects something, in this case a radio button, to change the behavior of the application, either the underlying object is changed and the display is incorrect, or vice versa. So if you've removed the checkboxes off of a page, as a result of the user selecting the entire search results, the application still thinks there are checkboxes and it causes what amounts to a fatal error and the need to reload the application. Imagine if this happens in the middle of a huge transaction. Because of the type of issues, I used to think that it was the JavaScript(alone) causing the problems, but then there are at least two sites that rely heavily on Apache and sessions to store data, using very little and for one no JavaScript, that are having problems also. Limited to the MAC. I'm sorry I'm not allowed to give access to the applications. They're owned but our client, and secured, therefore I can't grant access to the applications or code. Sorry. Although both types of sites are password protected only the HTTPS webs seem to have abundant issues. I can't see any reason for an application to act differently under HTTPS, but change the web to HTTP and the applications work much better!? I hopes this provides enough additional information. My hands are tied as far as how much information I can divulge, but I will try to answer more questions to help determine the cause. Apache is only suspicious to me because turning off keepalive makes such a vast improvement. Thanks for your help, Dana C. Chandler III e-Applications Developer W John Burns wrote: What version of the OS do they use ? I've a Mac (several versions of 7.x, no reason to use 8.x or 9.x), and could peek at your site if you provided a url... Also, are you sure it is the Mac OS that's the key variable ? Could it be browser (like using an old AOL browser, and getting stranded with HTML redirects, etc? Also, is this a CGI-style form application? Is the server issuing HTTP headers that reflect form-urlencoded as the correct MIME type? What happens when it doesn't work? Do people get prompts to download? John Burns Web Developer NY, NY "Dana C. Chandler III" wrote: Hi, Earlier I posted a message on finding the value of 'keepalive' (defined in httpd.conf), for an individual request. Since I did not get a response I'm trying from a different angle. I am lead developer for a web application running on Stronghold/2.4.2 Apache/1.3.6 C2NetEU/2412 (Unix) mod_perl/1.21. Does anyone know or can anyone rule out a bug in the way Apache processes requests for Macs? Several of our sites have had tremendous problems with Macs accessing our webs. I want to rule out Apache, because turning off the keepalive directive seems to clear up some but not all of our problems. We're using: BrowserMatchNoCase mac nokeepalive I'm at a loss. Any help, information, links and/or help in ruling out Apache, would be greatly appreciated. Dana C. Chandler III e-Applications Developer