Re: Any good WebMail programs?
I can use a primer on researching WebMail programs with the following http://www.astray.com/acmemail/ -- Eric Cholet
RE: Any good WebMail programs?
I've used SqWebMail with good success, it certainly seems to have all the features you wish for. Though I'd like to try Wing too to compare it. Matt. -- :-Get a smart net/:- -Original Message- From: Medi Montaseri [mailto:[EMAIL PROTECTED]] Sent: 13 December 2001 06:44 To: [EMAIL PROTECTED] Subject: Any good WebMail programs? I can use a primer on researching WebMail programs with the following criterian: - Linux based - Free - Preferably in Perl - Modularized Authentication subsystem (ie could hook up adapters to check with LDAP or RDBMS, though Linux can do that also) - Apache support - IMAP support - Multi-lingual (can be a phase II) - As feature-rich as possible (can be a phase II) Please note that I'm not looking for a service, I'm looking for the software itself. Thanks -- -- --- Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -- --- __ __ This email has been scanned for all viruses by the Star Internet Virus Screen. The service is provided in partnership with MessageLabs, the email security company. For more information on a higher level of virus protection visit www.star.net.uk __ __ _ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service.
Perl Handlers
How to set location for perl on Apache Webserver 1.3.19 Location / $how to set it for perl$ SetHandler --- Order deny,allow Deny from all Allow from myisp-provider /Location Thanks in advance, Regards, Anand
Re: Any good WebMail programs?
IMP is probably the best but it's written in PHP www.horde.org Francesco I can use a primer on researching WebMail programs with the following criterian: - Linux based - Free - Preferably in Perl - Modularized Authentication subsystem (ie could hook up adapters to check with LDAP or RDBMS, though Linux can do that also) - Apache support - IMAP support - Multi-lingual (can be a phase II) - As feature-rich as possible (can be a phase II) Please note that I'm not looking for a service, I'm looking for the software itself. Thanks -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -
ANNOUNCE: Apache::CacheContent 0.12 available (1st CPAN release)
Since nobody obected to Apache::CacheContent I've uploaded it to CPAN. The current version, 0.12, has a few small bug fixes, POD updates and a new ToDo list. (This version does not yet have the filename hash generator code) The complete README is reproduced below. You can download the code from CPAN or from the Cookbook site at http://www.modperlcookbook.org/ Thanks! NAME Apache::CacheContent - PerlFixupHandler class that caches dynamic content SYNOPSIS * Make your method handler a subclass of Apache::CacheContent * allow your web server process to write into portions of your document root. * Add a ttl() subroutine (optional) * Add directives to your httpd.conf that are similar to these: PerlModule MyHandler # dynamic url Location /dynamic SetHandler perl-script PerlHandler MyHandler-handler /Location # cached URL Location /cached SetHandler perl-script PerlFixupHandler MyHandler-disk_cache PerlSetVar CacheTTL 120 # in minutes... /Location DESCRIPTION Note: This code is derived from the *Cookbook::CacheContent* module, available as part of The mod_perl Developer's Cookbook The Apache::CacheContent module implements a PerlFixupHandler that helps you to write handlers that can automatically cache generated web pages to disk. This is a definite performance win for sites that end up generating the exact same content for many users. The module is written to use Apache's built-in file handling routines to efficiently serve data to clients. This means that your code will not need to worry about HTTP/1.X, byte ranges, if-modified-since, HEAD requests, etc. It works by writing files into your DocumentRoot, so be sure that your web server process can write there. To use this you MUST use mod_perl method handlers. This means that your version of mod_perl must support method handlers (the argument EVERYTHING=1 to the mod_perl build will do this). Next you'll need to have a content-generating mod_perl handler. If isn't a method handler modify the *handler* subroutine to read: sub handler ($$) { my ($class, $r) = @_; Next, make your handler a subclass of *Apache::CacheContent* by adding an ISA entry: @MyHandler::ISA = qw(Apache::CacheContent); You may need to modify your handler code to only look at the *uri* of the request. Remember, the cached content is independent of any query string or form elements. After this is done, you can activate your handler. To use your handler in a fully dyamic way configure it as a PerlHandler in your httpd.conf, like this: PerlModule MyHandler Location /dynamic SetHandler perl-script PerlHandler MyHandler-handler /Location So requests to *http://localhost/dynamic/foo.html* will call your handler method directly. This is great for debugging and testing the module. To activate the caching mechanism configure httpd.conf as follows: PerlModule MyHandler Location /cached SetHandler perl-script PerlFixupHandler MyHandler-disk_cache PerlSetVar CacheTTL 120 # in minutes.. /Location Now when you access URLs like *http://localhost/cached/foo.html* the content will be generated and stored in the file *DocumentRoot*/cached/foo.html. Subsequent request for the same URL will return the cached content, depending on the *CacheTTL* setting. For further customization you can write your own *ttl* function that can dynamically change the caching time based on the current request. AUTHORS Paul Lindner [EMAIL PROTECTED] Geoffrey Young [EMAIL PROTECTED] Randy Kobes [EMAIL PROTECTED] COPYRIGHT Copyright (c) 2001, Paul Lindner, Geoffrey Young, Randy Kobes. All rights reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. SEE ALSO The example mod_perl method handler `CacheWeather'. The mod_perl Developer's Cookbook HISTORY This code is derived from the *Cookbook::CacheContent* module, available as part of The mod_perl Developer's Cookbook. For more information, visit http://www.modperlcookbook.org/ -- Paul Lindner [EMAIL PROTECTED]| | | | | | | | | | mod_perl Developer's Cookbook http://www.modperlcookbook.org Human Rights Declaration http://www.unhchr.ch/udhr/index.htm
Re: Apache::SizeLimit Exit is Delayed
On Wed, 12 Dec 2001, Perrin Harkins wrote: what about $r-headers_out-add(Connection = 'close'); Good idea! I'll put that into a future release. Some bug report about Apache::SizeLimit diagnostic: I don't know about Linux and Solaris but under FreeBSD shared memory shows some incredible numbers: Apache::SizeLimit httpd process too big, exiting at SIZE=25092 KB SHARE=1823412 KB REQUESTS=79 LIFETIME=293 seconds I think that it due to rusage.ru_ixrss is integral value and it should be divided (but I don't know where to find divisor). And some recomendation - I'm using Apache::SizeLimit as PerlCleanupHandler - so Apache would exit after request is completed. mod_perl usually grows at response phase so exiting in fixup is not very usefull. I'm using mod_class for mod_perl size hard control during reponse phase. Igor Sysoev
RE: Apache::SizeLimit Exit is Delayed
Geoff wrote: what about $r-headers_out-add(Connection = 'close'); I tried each of these changes in turn. Neither worked to immediately exit the child. I never saw that either of them would exit the child at all but I may not have kept them running long enough. hmph... are you running Apache::SizeLimit as a PerlCleanupHandler? then, of course, this particular fix won't work... just curious, mainly. that _should_ work... --Geoff
form upload limit
Hello, I didn't find anywhere in Net how much is browser form upload limit (with POST) and how much is Apache's default form data access(input) limit. If anyone knows where I can find this data i'd be grateful. I tested this form upload with large text and in my case only 64K went thru (ended up in MySQL). I saw in Apache homepage, that I could define POST_MAX like this: my $apr = Apache::Request-new($r, POST_MAX = 1024); Err, is this 1024 bytes or kbytes? (OT - Perl basics question) Right now I define $apr this way: $apr = Apache::Request-new( $r-is_main ? $r : $r-main ); Now how I tell $apr that its POST_MAX = 1024? Rgds, Viljo
Re: Any good WebMail programs?
This is very off-topic but I'll mention it because you can install the whole server and be running faster than you can do the research to find something else.Look at http://www.e-smith.org. They have a modified Redhat distribution that is an 'office-in-a-box' and includes webmail access along with most of the other services you might want, all managed through a web interface. If you go to www.e-smith.com instead, you will find the commercial, supported service, but the .org site has a free iso image download and pretty good documentation on how to customize their template-driven configuration. The webmail program happens to be imp, using php and it currently doesn't have a way to authenticate against LDAP, although an LDAP directory is automatically updated as you add users. Les Mikesell [EMAIL PROTECTED]
Re: Any good WebMail programs?
Francesco Pasqualini [EMAIL PROTECTED] wrote: IMP is probably the best but it's written in PHP www.horde.org I know this is straying into OT territory, but hopefully someone can benefit from the discussion. We used an IMP based product for a while, but if you must customize the code, TWIG is much easier to read (and *much* more modular) - twig.screwdriver.net. It's also written in PHP. My headache might have been from an earlier version of IMP than is now available. If you are interested in getting the LDAP extensions I have for it, email me in private (https://neoweb.tamu.edu/ for anonymous access example). I hope to have a tarball public in a week. I'm tired of dealing with PHP and it's problems (mainly string comparisons) so I'm working on moving it all over to Perl over the next year. But that doesn't help you now :) I can use a primer on researching WebMail programs with the following criterian: - Linux based - Free - Preferably in Perl - Modularized Authentication subsystem (ie could hook up adapters to check with LDAP or RDBMS, though Linux can do that also) - Apache support - IMAP support - Multi-lingual (can be a phase II) - As feature-rich as possible (can be a phase II) Please note that I'm not looking for a service, I'm looking for the software itself. Thanks -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering - -- James Smith [EMAIL PROTECTED], 979-862-3725 Texas AM CIS Operating Systems Group, Unix
Re: Apache::SizeLimit Exit is Delayed
Some bug report about Apache::SizeLimit diagnostic: I don't know about Linux and Solaris but under FreeBSD shared memory shows some incredible numbers: Okay, I'll ask the guy who wrote the *BSD support to look into it. I don't have a FreeBSD system to test with. And some recomendation - I'm using Apache::SizeLimit as PerlCleanupHandler - so Apache would exit after request is completed. You should use it in an early phase, like PerlFixupHandler. It pushes a cleanup handler if it needs to exit. It will not exit until after the request is done. I'm using mod_class for mod_perl size hard control during reponse phase. I've never heard of mod_class. Do you have a link for it? My official recommendation is to set Apache::SizeLimit up with low enough numbers that you can handle it if it grows a little more during the final request, and use Apache::Resource as a hard limit to prevent runaway processes from eating up all your RAM. Apache::Resource will kill your process even if it's in the middle of a response, so you don't want to use it for normal size control. - Perrin
Re: Apache::SizeLimit Exit is Delayed
Perrin Harkins wrote: Try changing the call $r-child_terminate() to Apache::exit(). If this seems to work better for you, let me know and I'll consider changing this in a future release of Apache::SizeLimit. Geoff wrote: what about $r-headers_out-add(Connection = 'close'); I tried each of these changes in turn. Neither worked to immediately exit the child. I never saw that either of them would exit the child at all but I may not have kept them running long enough. Did you see more requests being handled by the same process? I noticed an odd pattern of behavior. With one of our cgi scripts, and using $r-child_terminate(), the child would always exit immediately. With other scripts, it wouldn't exit. With both Perrin's and Geoff's suggestions from above, that same script would cause the process being used to be changed, but the old process wouldn't exit. You mean the old process hangs around, but doesn't take any new requests? - Perrin
RE: Auth Handlers
He he : ) I think this discussion is being miscommunicated (if that is a relevant word). I do not want authorization to be performed in the typical manner. Perhaps I want the information from a form submit or a cookie. I understand how the Apache authentication configuration works but I want to strictly use mod_perl to modify the authentication mechanisms without the standard Apache intervention. You mean you want to do authorization in a FixupHandler?? No, this is what I currently have to do to avoid Apache from sending the 'auth request' headers to the browser and still perform custom authentication via a form submit, cookie, etc. Thanks, : ) No problem, I guess I am unsure if this is the proper way to setup an Access, Authen, Authz handler. When I use this configuration my 'handler()' method does not get called and I get an error in the logs: [Mon Dec 10 13:13:03 2001] [crit] [client 192.168.0.1] configuration error: couldn't check user. No user file?: /index.html I think Apache is looking for the wrong file. Check the config for AuthUserFile. Did you use htpasswd to create it? I tried moving it down to be an Authz handler but the same error occurs. However, if I push this package as a FixupHandler it works fine and the 'handler()' method gets called. You mean you want to do authorization in a FixupHandler?? If you like I can let you have some scripts which will show you one way of checking for authorization without a second request for a username/password, assuming that at some stage in the browser session one was already supplied. Is that what you meant? 73, Ged.
Re: Apache::SizeLimit Exit is Delayed
On Thu, 13 Dec 2001, Perrin Harkins wrote: And some recomendation - I'm using Apache::SizeLimit as PerlCleanupHandler - so Apache would exit after request is completed. You should use it in an early phase, like PerlFixupHandler. It pushes a cleanup handler if it needs to exit. It will not exit until after the request is done. I didn't know it. I think you should document it. But any way I think it's better to check size in cleanup. I'm using mod_class for mod_perl size hard control during reponse phase. I've never heard of mod_class. Do you have a link for it? It's BSD specific module. It allow to set login class for process to limit memory or time usage. mod_class: ftp://ftp.lexa.ru/pub/apache-rus/contrib/mod_class.c There is more early module - mod_setclass: http://www.apache.org/dist/httpd/contrib/modules/1.3/mod_setclass.c The main difference - mod_setclass sets login class for each Apache child while mod_class sets class for main Apache process. mod_setclass is better to set time restriction - with mod_class you need to restart main Apache every day (it's common practice to rotate logs) otherwise main Apache can exhaust time limit. My official recommendation is to set Apache::SizeLimit up with low enough numbers that you can handle it if it grows a little more during the final request, and use Apache::Resource as a hard limit to prevent runaway processes from eating up all your RAM. Apache::Resource will kill your process even if it's in the middle of a response, so you don't want to use it for normal size control. mod_class and mod_setclass make the same on BSD. Igor Sysoev
Re: Apache::SizeLimit Exit is Delayed
You should use it in an early phase, like PerlFixupHandler. It pushes a cleanup handler if it needs to exit. It will not exit until after the request is done. I didn't know it. I think you should document it. But any way I think it's better to check size in cleanup. I agree and I plan to change this. It's BSD specific module. It allow to set login class for process to limit memory or time usage. How about sending Stas a patch for the guide with information on this? It might be useful to other BSD'ers. - Perrin
Re: form upload limit
Viljo Marrandi wrote: Hello, I didn't find anywhere in Net how much is browser form upload limit (with POST) and how much is Apache's default form data access(input) limit. If anyone knows where I can find this data i'd be grateful. There is no such a limit in Apache and probably most browsers. The limit can be the amount of available RAM (if the file is aggregated in the memory) or the filesystem limits (not enough disk space, if the uploaded file is created on the filesystem). You can limit it within your code, though. I tested this form upload with large text and in my case only 64K went thru (ended up in MySQL). I saw in Apache homepage, that I could define POST_MAX like this: my $apr = Apache::Request-new($r, POST_MAX = 1024); Err, is this 1024 bytes or kbytes? Since CGI.pm is the base of Apache::Request (but written in Perl, whereas Apache::Request is written mostly in C), parts of CGI.pm's extensive documentation will apply for Apache::Request as well. So if you look at CGI.pm's manpage you will see that it's in bytes: $CGI::POST_MAX If set to a non-negative integer, this variable puts a ceiling on the size of POSTings, in *bytes*. If CGI.pm detects a POST that is greater than the ceiling, it will immediately exit with an error message. This value will affect both ordinary POSTs and multipart POSTs, meaning that it limits the maximum size of file uploads as well. You should set this to a reasonably high value, such as 1 megabyte. You are welcome to send the documentation patches to the developers of the Apache::Request package at [EMAIL PROTECTED] This kind of contribution helps a lot. (OT - Perl basics question) Right now I define $apr this way: $apr = Apache::Request-new( $r-is_main ? $r : $r-main ); Now how I tell $apr that its POST_MAX = 1024? either: my $real_r = $r-is_main ? $r : $r-main; my $apr = Apache::Request-new($real_r, POST_MAX = 1024); or $apr = Apache::Request-new( ($r-is_main ? $r : $r-main), POST_MAX = 1024 ); _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: form upload limit
I didn't find anywhere in Net how much is browser form upload limit (with POST) and how much is Apache's default form data access(input) limit. If anyone knows where I can find this data i'd be grateful. Apache's default is 75 and it's under the directive LimitRequestBody 75 From my expirience, it is the lower boud of the size limit (that is Apache size limit seems to overwrite size limit from POST_MAX) As far as POST_MAX... I was using CGI::POST_MAX=1024*100, which would set the max size to 100 kb. It's also defind in CGI.pm hope this helps, Monika I tested this form upload with large text and in my case only 64K went thru (ended up in MySQL). I saw in Apache homepage, that I could define POST_MAX like this: my $apr = Apache::Request-new($r, POST_MAX = 1024); Err, is this 1024 bytes or kbytes? (OT - Perl basics question) Right now I define $apr this way: $apr = Apache::Request-new( $r-is_main ? $r : $r-main ); Now how I tell $apr that its POST_MAX = 1024? Rgds, Viljo
Re: form upload limit
There is no such a limit in Apache and probably most browsers. By default, LimitRequestBody is 0 (unlimited) in Apache. We limit incoming requests with this directive, so server resources aren't consumed by excessive. I think POST_MAX happens after the request is already read into memory. LimitXMLRequestBody has a default limit of 100. There are other LimitRequest* directives which limit various aspects of the header. Rob
Re: form upload limit
On Thu, 13 Dec 2001, Stas Bekman wrote: Viljo Marrandi wrote: Hello, I didn't find anywhere in Net how much is browser form upload limit (with POST) and how much is Apache's default form data access(input) limit. If anyone knows where I can find this data i'd be grateful. There is no such a limit in Apache and probably most browsers. The limit can be the amount of available RAM (if the file is aggregated in the memory) or the filesystem limits (not enough disk space, if the uploaded file is created on the filesystem). You can limit it within your code, though. About one third requests going through proxies. And about 70% of proxies are Squids. And nearly all Squids has default upload limit of 1M. Igor Sysoev
Re: Apache::SizeLimit Exit is Delayed
On Thu, 13 Dec 2001, Perrin Harkins wrote: You should use it in an early phase, like PerlFixupHandler. It pushes a cleanup handler if it needs to exit. It will not exit until after the request is done. I didn't know it. I think you should document it. But any way I think it's better to check size in cleanup. I agree and I plan to change this. It's BSD specific module. It allow to set login class for process to limit memory or time usage. How about sending Stas a patch for the guide with information on this? It might be useful to other BSD'ers. My English is too poor for it. Igor Sysoev
Re: form upload limit
Joe Schaefer [EMAIL PROTECTED] said something to this effect on 12/13/2001: Is this what you want $apr = Apache::Request-new( $r-is_main ? $r : $r-main, POST_MAX = 1024); ? I don't think Apache::Request provides any Perl methods for culling the post_max setting from a $apr; you'd either have to write some XS for that, keep track of it yourself, or lobby for a new feature ;) Or you can patch libapreq-0.33/Request/Request.xs: *** Request.xs.orig Thu Dec 13 11:44:25 2001 --- Request.xs Thu Dec 13 11:36:06 2001 *** *** 356,361 --- 356,375 Apache::Request req int + ApacheRequest_post_max(req, max=Nullsv) + Apache::Request req + SV *max; + + CODE: + if (max != Nullsv) { + req-post_max = (int)SvIV(max); + } + RETVAL = req-post_max; + + OUTPUT: + RETVAL + + int ApacheRequest_parse(req) Apache::Request req This will add $apr-post_max, which works in my (simplistic and deterministic) tests. (darren) -- If I worked as much as others I would do as little as they.
Re: Apache::Scoreboard question
Anand R wrote: # ScoreBoardFile: File used to store internal server process information. # Not all architectures require this. But if yours does (you'll know because # this file will be created when you run Apache) then you *must* ensure that # no two invocations of Apache share the same scoreboard file. # ScoreBoardFile logs/apache_runtime_status This should help you, -Anand Thanks for your answer, but I'm not sure how this should help me. Can I (and how) use Apache::Scoreboard to access full child's request record incl. virtual host name? - Robert - Original Message - From: Robert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 11:38 AM Subject: Apache::Scoreboard question Hi, can Apache::Scoreboard be extended that with last request per child it would also return the corresponding virtual host name? I would be usefull for Apache::VMonitor. Thanks.
Re: Apache::SizeLimit Exit is Delayed
Hi there, On Thu, 13 Dec 2001, Igor Sysoev wrote: On Thu, 13 Dec 2001, Perrin Harkins wrote: How about sending Stas a patch for the guide with information on this? It might be useful to other BSD'ers. My English is too poor for it. Send it to me then. :) 73, Ged.
Has anyone else seen this?
I'm referring to Term::Readline problems. A while back I had all sorts of trouble with Term::Readline and was basically deleting it any time this that or the other module insisted it be there. Recently things have been pretty quiet so I've been letting it live. Suddenly though, as I was adding some top level directives to a mod_perl module, Apache::DB quit working with the spew below the sig. I know I can back out my work or maybe delete Term::Readline again (and recompile the whole works *sigh*), but that's not the point. If anyone's seen or heard of this, I'd appreciate a hint. Rick Myers[EMAIL PROTECTED] The Feynman Problem 1) Write down the problem. Solving Algorithm 2) Think real hard. 3) Write down the answer. Start of spew My::Declined::handler(/home/rik/perllib/My/Declined.pm:5): 5: sub handler { DECLINED } Signal SEGV at /usr/lib/perl5/site_perl/5.6.0/Term/ReadLine/readline.pm line 460 require 0 called at /usr/lib/perl5/site_perl/5.6.0/Term/ReadLine/readlin e.pm line 459 readline::preinit called at /usr/lib/perl5/site_perl/5.6.0/Term/ReadLine /readline.pm line 192 require Term/ReadLine/readline.pm called at /usr/lib/perl5/site_perl/5.6 .0/Term/ReadLine/Perl.pm line 58 require 0 called at /usr/lib/perl5/site_perl/5.6.0/Term/ReadLine/Perl.pm line 58 Term::ReadLine::Perl::new('Term::ReadLine', 'perldb', 'GLOB(0x82b58d4)', 'GLOB(0x82b5844)') called at /usr/lib/perl5/site_perl/5.6.0/i686-linux/Apache/p erl5db.pl line 1758 DB::setterm called at /usr/lib/perl5/site_perl/5.6.0/i686-linux/Apache/p erl5db.pl line 592 DB::DB called at /home/rik/perllib/My/Declined.pm line 5 My::Declined::handler('Apache=SCALAR(0x83699d8)') called at /usr/lib/per l5/site_perl/5.6.0/i686-linux/Term/ReadKey.pm line 0 require 0 called at /usr/lib/perl5/site_perl/5.6.0/i686-linux/Term/ReadK ey.pm line 0 Abort End of spew
Re: Any good WebMail programs?
I would say Indigoperl has a better mail utility www.indigostar.com -Anand - Original Message - From: Drew Taylor [EMAIL PROTECTED] To: Medi Montaseri [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 14, 2001 8:31 AM Subject: Re: Any good WebMail programs? I can recommend SquirrelMail (http://www.squirrelmail.org/) It's also written in PHP, but seems pretty well laid out. It also works well w/ shared hosting. :-) At 10:44 PM 12/12/2001 -0800, Medi Montaseri wrote: I can use a primer on researching WebMail programs with the following criterian: - Linux based - Free - Preferably in Perl - Modularized Authentication subsystem (ie could hook up adapters to check with LDAP or RDBMS, though Linux can do that also) - Apache support - IMAP support - Multi-lingual (can be a phase II) - As feature-rich as possible (can be a phase II) Drew Taylor JA[P|m_p|SQL]H http://www.drewtaylor.com/ Just Another Perl|mod_perl|SQL Hacker mailto:[EMAIL PROTECTED] *** God bless America! *** ICQ: 135298242
Re: Can't call Apache::Request-new()
So no replies to this -- could someone even confirm they have a working Apache::Request v0.33 on perl 5.6.1? That would be a big help in at least determining whether it's perhaps something amiss here. Else I'll file it as a bug. Cheers, Paul On Tue, Dec 11, 2001 at 09:11:50PM -0800, Paul Makepeace wrote: I'm getting the following error, $ perl -MApache::Request -e 'Apache::Request-new' Can't locate object method new via package Apache::Request (perhaps you forgot to load Apache::Request?) at -e line 1. $ ...both from the command line and under a PerlHandler Apache::Registry'd script. Of course, it is installed: $ perl -MApache::Request -le 'print grep /Request/, values %INC; print $Apache::Request::VERSION' /usr/local/lib/perl/5.6.1/Apache/Request.pm 0.33 $ In all other respects I'm able to discern so far mod_perl, Perl and Apache are working here (I have a number of sites using Template Toolkit with a custom PerlHandler and a few scripts under Apache::Registry). I'm getting this error from both a fresh CPAN install and Debian's libapache-request-perl package (not installed at the same time!). Any suggestions where to start looking? Thanks, Paul PS Rather than cluttering your inbox, perl -V is at http://paulm.com/tmp/perl_v.txt
Re: Can't call Apache::Request-new()
The Request Object contains info sent to the server in the client's request. The Information stored under the Request object *ClientCertificate *Cookies *form *QueryString *ServerVariables The ServerVariables collections stores both ENV variables relavent to the transaction and HTTP headers sent in the request. The header objects are accessiable by using the syntax:- HTTP_HeaderName Maybe after all these clarification will help you,If I have understood your problem. Subject: Re: Can't call Apache::Request-new() Maybe this should not a big problem,U just have to have a look at the Apache Doc. regards, Anand DSM Soft (P) Ltd www.dsmsoft.com - Original Message - From: Paul Makepeace [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 14, 2001 12:12 PM Subject: Re: Can't call Apache::Request-new() So no replies to this -- could someone even confirm they have a working Apache::Request v0.33 on perl 5.6.1? That would be a big help in at least determining whether it's perhaps something amiss here. Else I'll file it as a bug. Cheers, Paul On Tue, Dec 11, 2001 at 09:11:50PM -0800, Paul Makepeace wrote: I'm getting the following error, $ perl -MApache::Request -e 'Apache::Request-new' Can't locate object method new via package Apache::Request (perhaps you forgot to load Apache::Request?) at -e line 1. $ ...both from the command line and under a PerlHandler Apache::Registry'd script. Of course, it is installed: $ perl -MApache::Request -le 'print grep /Request/, values %INC; print $Apache::Request::VERSION' /usr/local/lib/perl/5.6.1/Apache/Request.pm 0.33 $ In all other respects I'm able to discern so far mod_perl, Perl and Apache are working here (I have a number of sites using Template Toolkit with a custom PerlHandler and a few scripts under Apache::Registry). I'm getting this error from both a fresh CPAN install and Debian's libapache-request-perl package (not installed at the same time!). Any suggestions where to start looking? Thanks, Paul PS Rather than cluttering your inbox, perl -V is at http://paulm.com/tmp/perl_v.txt
cvs commit: modperl-2.0/todo missing_old_features.txt
stas01/12/13 18:07:30 Modified:todo missing_old_features.txt Log: - need to port Apache::__T flag Revision ChangesPath 1.16 +4 -0 modperl-2.0/todo/missing_old_features.txt Index: missing_old_features.txt === RCS file: /home/cvs/modperl-2.0/todo/missing_old_features.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- missing_old_features.txt 2001/11/19 00:07:28 1.15 +++ missing_old_features.txt 2001/12/14 02:07:30 1.16 @@ -33,6 +33,10 @@ - ... others ... +- Apache::__T flag which tells whether we run under -T (in 5.8.0 can check + ${^TAINT}) + + core modules:
cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm
stas01/12/13 20:10:20 Modified:lib/ModPerl WrapXS.pm Log: - don't cache the autogeneration warning (it's not the same because of the generation trace) Revision ChangesPath 1.37 +9 -12 modperl-2.0/lib/ModPerl/WrapXS.pm Index: WrapXS.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- WrapXS.pm 2001/11/28 17:05:56 1.36 +++ WrapXS.pm 2001/12/14 04:10:20 1.37 @@ -26,12 +26,6 @@ glue_dirs = [xs_glue_dirs()], }, $class; -for (qw(c hash)) { -my $w = noedit_warning_$_; -my $method = ModPerl::Code::$w; -$self-{$w} = $self-$method(); -} - $self-typemap-get; $self; } @@ -298,8 +292,10 @@ local $Data::Dumper::Terse = 1; $deps = Dumper $deps; +my $noedit_warning = $self-ModPerl::Code::noedit_warning_hash(); + print $fh EOF; -$self-{noedit_warning_hash} +$noedit_warning use lib qw(../../../lib); #for Apache::BuildConfig use ModPerl::MM (); @@ -412,8 +408,8 @@ my($self, $module, $functions) = @_; my $fh = $self-open_class_file($module, '.xs'); -print $fh $self-{noedit_warning_c}\n, - \n#define MP_IN_XS\n\n; +print $fh $self-ModPerl::Code::noedit_warning_c(), \n; +print $fh \n#define MP_IN_XS\n\n; my @includes = @{ $self-includes }; @@ -493,9 +489,10 @@ my $loader = join '::', $base, 'XSLoader'; my $fh = $self-open_class_file($module, '.pm'); +my $noedit_warning = $self-ModPerl::Code::noedit_warning_hash(); print $fh EOF; -$self-{noedit_warning_hash} +$noedit_warning package $module; $isa @@ -523,7 +520,7 @@ my %seen; my $fh = $self-open_class_file('ModPerl::WrapXS', 'typemap'); -print $fh $self-{noedit_warning_hash}\n; +print $fh $self-ModPerl::Code::noedit_warning_hash(), \n; while (my($type, $class) = each %$map) { $class ||= $type; @@ -550,7 +547,7 @@ my $file = join '/', $self-{XS_DIR}, $h; open my $fh, '', $file or die open $file: $!; -print $fh $self-{noedit_warning_c}\n; +print $fh $self-ModPerl::Code::noedit_warning_c(), \n; print $fh $code; close $fh; }
cvs commit: modperl-2.0/src/modules/perl modperl_util.c modperl_util.h
stas01/12/13 20:35:28 Modified:src/modules/perl modperl_util.c modperl_util.h Log: - porting modperl_perl_gensym from 1.x Revision ChangesPath 1.32 +10 -0 modperl-2.0/src/modules/perl/modperl_util.c Index: modperl_util.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- modperl_util.c2001/11/19 23:24:46 1.31 +++ modperl_util.c2001/12/14 04:35:28 1.32 @@ -572,3 +572,13 @@ { return gv_stashpv(name, FALSE) ? 1 : 0; } + +/* same as Symbol::gensym() */ +SV *modperl_perl_gensym(pTHX_ char *pack) +{ +GV *gv = newGVgen(pack); +SV *rv = newRV((SV*)gv); +(void)hv_delete(gv_stashpv(pack, TRUE), +GvNAME(gv), GvNAMELEN(gv), G_DISCARD); +return rv; +} 1.31 +2 -0 modperl-2.0/src/modules/perl/modperl_util.h Index: modperl_util.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- modperl_util.h2001/11/06 18:39:41 1.30 +++ modperl_util.h2001/12/14 04:35:28 1.31 @@ -112,4 +112,6 @@ MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name); +SV *modperl_perl_gensym(pTHX_ char *pack); + #endif /* MODPERL_UTIL_H */
cvs commit: modperl-2.0/t/response/TestApache compat.pm
stas01/12/13 20:52:46 Modified:todo api.txt lib/Apache compat.pm t/apache compat.t t/response/TestApache compat.pm Log: - Apache-gensym now lives in compat.pm Revision ChangesPath 1.17 +0 -3 modperl-2.0/todo/api.txt Index: api.txt === RCS file: /home/cvs/modperl-2.0/todo/api.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- api.txt 2001/11/13 17:42:49 1.16 +++ api.txt 2001/12/14 04:52:45 1.17 @@ -90,9 +90,6 @@ $r-cgi_header_out: anything in 1.x land actually using it? -Apache-gensym: - Apache::compat ? - $r-post_connection: alias not implemented 1.31 +5 -0 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- compat.pm 2001/12/10 08:28:22 1.30 +++ compat.pm 2001/12/14 04:52:45 1.31 @@ -26,6 +26,7 @@ use APR::Table (); use APR::Pool (); use mod_perl (); +use Symbol (); BEGIN { $INC{'Apache.pm'} = __FILE__; @@ -64,6 +65,10 @@ sub module { require Apache::Module; return Apache::Module::loaded($_[1]); +} + +sub gensym { +return Symbol::gensym(); } package Apache::Constants; 1.8 +8 -1 modperl-2.0/t/apache/compat.t Index: compat.t === RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- compat.t 2001/12/10 04:32:40 1.7 +++ compat.t 2001/12/14 04:52:45 1.8 @@ -6,7 +6,7 @@ use Apache::TestUtil; use Apache::TestRequest; -plan tests = 30, todo = [24, 27, 29], \have_lwp; +plan tests = 31, todo = [25, 28, 30], \have_lwp; my $location = /TestApache::compat; @@ -38,6 +38,13 @@ GET_BODY(query(@data)), q{$r-Apache::args} ); +} + +# Apache-gensym +{ +my @data = (test = 'gensym'); +my $data = GET_BODY query(@data) || ''; +ok_nok($data); } # header_in 1.8 +6 -1 modperl-2.0/t/response/TestApache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- compat.pm 2001/12/10 08:31:15 1.7 +++ compat.pm 2001/12/14 04:52:45 1.8 @@ -14,6 +14,7 @@ sub handler { my $r = shift; +$gr = $r; $r-send_http_header('text/plain'); @@ -33,6 +34,11 @@ if ($data{test} eq 'content' || $data{test} eq 'args') { $r-print(test $data{test}); } +elsif ($data{test} eq 'gensym') { +debug Apache-gensym; +my $fh = Apache-gensym; +ok ref $fh eq 'GLOB'; +} elsif ($data{test} eq 'header') { my $way = $data{way}; my $sub = header_$way; @@ -78,7 +84,6 @@ } } elsif ($data{test} eq 'Apache::File') { -$gr = $r; my $file = $vars-{t_conf_file}; debug new Apache::File file object;
cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm
stas01/12/13 21:12:13 Modified:lib/ModPerl WrapXS.pm Log: s/catfile/catdir/ when working with dirs Submitted by: Barrie Slaymaker [EMAIL PROTECTED] Reviewed by: stas Revision ChangesPath 1.39 +3 -3 modperl-2.0/lib/ModPerl/WrapXS.pm Index: WrapXS.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- WrapXS.pm 2001/12/14 04:51:55 1.38 +++ WrapXS.pm 2001/12/14 05:12:13 1.39 @@ -11,7 +11,7 @@ use File::Path qw(rmtree mkpath); use Cwd qw(fastcwd); use Data::Dumper; -use File::Spec::Functions qw(catfile); +use File::Spec::Functions qw(catfile catdir); our $VERSION = '0.01'; @@ -221,7 +221,7 @@ sub prepare { my $self = shift; $self-{DIR} = 'WrapXS'; -$self-{XS_DIR} = catfile fastcwd(), 'xs'; +$self-{XS_DIR} = catdir fastcwd(), 'xs'; if (-e $self-{DIR}) { rmtree([$self-{DIR}], 1, 1); @@ -243,7 +243,7 @@ my $dirname = $self-class_dirname($class); my $dir = ($dirname =~ m:/: and $dirname !~ m:^$self-{DIR}:) ? - catfile($self-{DIR}, $dirname) : $dirname; + catdir($self-{DIR}, $dirname) : $dirname; mkpath [$dir], 1, 0755 unless -d $dir;