Re: Mason vs embperl
So I installed and compared. I preferred the syntax of Mason, the flexible way to build components, the caching ... it have to be said here that I choose Mason ... I agree, the caching is very good and one gets up and running in no time with Mason. However, I find it imposes too much of a coding style to the programmer : for example, all pages are evaluated inside the same package and thus one cannot define two normal subroutines with the same name in two different pages. -- Tout n'y est pas parfait, mais on y honore certainement les jardiniers Dominique Quatravaux [EMAIL PROTECTED]
RE: Tips tricks needed :)
-Original Message- From: Tatsuhiko Miyagawa [mailto:[EMAIL PROTECTED]] On Wed, 19 Dec 2001 16:01:22 - Matt Sergeant [EMAIL PROTECTED] wrote: Actually I was wondering about writing an Apache::Singleton class, that works the same as Class::Singleton, but clears the singleton out on each request (by using pnotes). Would anyone be interested in that? Like this? (using register_cleanup instead of pnotes) package Apache::Singleton; use strict; use vars qw($VERSION); $VERSION = '0.01'; use Apache; sub instance { my $class = shift; # get a reference to the _instance variable in the $class package no strict 'refs'; my $instance = $class\::_instance; unless (defined $$instance) { $$instance = $class-_new_instance(@_); Apache-request-register_cleanup(sub { undef $$instance }); } return $$instance; } sub _new_instance { bless {}, shift; } Yeah, just like that. Why don't you wrap it up and stick it on CPAN? Saves me another module :-) Matt. _ 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.
ANNOUNCE: Apache:Singleton 0.01 (Re: Tips tricks needed :))
On Thu, 20 Dec 2001 08:57:32 - Matt Sergeant [EMAIL PROTECTED] wrote: Yeah, just like that. Why don't you wrap it up and stick it on CPAN? Saves me another module :-) Okay ;) The URL http://bulknews.net/lib/archives/Apache-Singleton-0.01.tar.gz has entered CPAN as file: $CPAN/authors/id/M/MI/MIYAGAWA/Apache-Singleton-0.01.tar.gz size: 1641 bytes md5: 57abd03817ead367287d1f5908c0143b NAME Apache::Singleton - Singleton class for mod_perl SYNOPSIS package Printer; use base qw(Apache::Singleton); # just the same as Class::Singleton DESCRIPTION Apache::Singleton works the same as Class::Singleton, but clears the singleton out on each request. This module checks $ENV{MOD_PERL}, so it just works well in non-mod_perl environment. AUTHOR Original idea by Matt Sergeant [EMAIL PROTECTED]. Code by Tatsuhiko Miyagawa [EMAIL PROTECTED] This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO the Class::Singleton manpage -- Tatsuhiko Miyagawa [EMAIL PROTECTED]
Re: Tips tricks needed :)
(sorry to break threading but I'm getting this from multiple lists) that IE 6 (beta at the time) considered my cookies to be third party because I used frame-based domain redirection and by default would not accept them. You need to include a P3P header in your HTTP header that contains a Compact Policy (CP) - a geek code of what your P3P xml privacy document contains. See http://www.w3c.org/P3P/. Some research I did seems to indicate that current implementations of IE6 will accept cookies no matter what CP you use (rather than checking it against your security settings and deciding if the CP represents a privacy policy that violates your chosen level of disclosure.) I'd really appreciate it other people could check this and confirm that IE6 is not offering any actual privacy level protection and is just discriminated against people that don't have P3P headers. My (Profero's) module for automagically converting a P3P document (the xml) into a CP (the geek-code version of that xml document) is in beta here: http://twoshortplanks.com/temp/P3P-ToCP-0.02.tar.gz Please test, break and get back to me when it doesn't work. It just follows the spec and uses XML::XPath to pull the stuff out. Later Mark. -- s'' Mark Fowler London.pm Bath.pm http://www.twoshortplanks.com/ [EMAIL PROTECTED] ';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/ +/ ){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}
Re: [OT] Tips tricks needed :)
Mark Fowler wrote: I'd really appreciate it other people could check this and confirm that IE6 is not offering any actual privacy level protection and is just discriminated against people that don't have P3P headers. I tried a few header combinations before I got IE6 to send cookies in frames where one frame is an external site, so it is parsing the header, not just requiring its existence. I'm not sure if it actually looks at a users settings to determine if the policy is acceptable based on user prefs.
Re: Report on mod_accel and mod_deflate
On Thu, 20 Dec 2001, Jeremy Howard wrote: Note that mod_accel can also be called by utilising the mod_rewrite [P] directive, just like with mod_proxy. If I put [P] in a RewriteRule, how does Apache know whether I want it to use mod_proxy or mod_accel? AccelSet* adds X-* headers to the request to the backend. This is useful to know what the original request details were. In ftp://ftp.lexa.ru/pub/apache-rus/contrib/ (where I have been told to download mod_accel/mod_deflate from before), I see another file called mod_realip-1.0.tar.gz just released one week ago. From looking at the keywords in the documentation, it looks like a module to be installed on the backend httpd that will parse these X-* headers to retrieve the original IP address. By default only text/html is compressed. I think it's safe to compress text/plain by default, too; I've never seen any browser problems with compressed text/plain (only text/js and text/css).
Re: Report on mod_accel and mod_deflate
Philip Mak wrote: In ftp://ftp.lexa.ru/pub/apache-rus/contrib/ (where I have been told to download mod_accel/mod_deflate from before), I see another file called mod_realip-1.0.tar.gz just released one week ago. From looking at the keywords in the documentation, it looks like a module to be installed on the backend httpd that will parse these X-* headers to retrieve the original IP address. Correct. This is a simple module that fills out $R-connection-ip with the X- header added by mod_deflate.
Re: Report on mod_accel and mod_deflate
On Thu, 20 Dec 2001, Philip Mak wrote: On Thu, 20 Dec 2001, Jeremy Howard wrote: Note that mod_accel can also be called by utilising the mod_rewrite [P] directive, just like with mod_proxy. Even more. You can use mod_accel/mod_rewrite/mod_include: RewriteRule ^/one.html$ http://backend/$1 [P] !--#include virtual=/one.html?arg=some -- If I put [P] in a RewriteRule, how does Apache know whether I want it to use mod_proxy or mod_accel? mod_proxy and mod_accel can work together expect one case - mod_rewrite [P]. You can disable mod_accel's [P] with --without-mod_rewrite mod_accel configure parameter. AccelSet* adds X-* headers to the request to the backend. This is useful to know what the original request details were. In ftp://ftp.lexa.ru/pub/apache-rus/contrib/ (where I have been told to download mod_accel/mod_deflate from before), I see another file called mod_realip-1.0.tar.gz just released one week ago. From looking at the keywords in the documentation, it looks like a module to be installed on the backend httpd that will parse these X-* headers to retrieve the original IP address. Yes, it can set IP using X-Real-IP header (default) or X-Forwarde-For header. Also mod_realip set IP in one of three phases - postread, header and fixups. By default only text/html is compressed. I think it's safe to compress text/plain by default, too; I've never seen any browser problems with compressed text/plain (only text/js and text/css). There is no text/js type - application/x-javascript instead. Macromedia FlashPlayer 4.x-5.x doesn't understand compressed text files received via loadVariables() function. These files can have any type but usually they have text/plain. If you site doesn't use such flash movies - you can safely compress text/plain: DeflateTypes text/plain Igor Sysoev
Re: Report on mod_accel and mod_deflate
On Thu, 20 Dec 2001, Jeremy Howard wrote: Thank you, Jeremy. Here is some comments. OK, enough evangelism. On to practical matters. Many of the following snippets and comments were provided to me by Igor in private email, so thank him, not me. Firstly, here's how to compile everything (including mod_ssl on the front-end) and install it into /usr/local/apache_accel: tar -zxvf mod_accel-1.0.7.tar.gz tar -zxvf mod_deflate-1.0.9.tar.gz tar -zxvf mm-1.1.3.tar.gz cd mm-1.1.3 ./configure --disable-shared make cd ../mod_ssl-2.8.5-1.3.22 ./configure --with-apache=../apache_1.3.22_accel/ \ --with-crt=/INSERT_APPROPRIATE_PATH.crt \ --with-key=/INSERT_APPROPRIATE_PATH.key cd ../mod_accel-1.0.7 ./configure --with-apache=../apache_1.3.22_accel/ \ --with-eapi=../mod_ssl-2.8.5-1.3.22/pkg.eapi/ make You don't need to use mod_ssl but you need EAPI distributed with mod_ssl. So if you don't use mod_ssl you need untar it only and set path to EAPI: cd ../mod_accel-1.0.7 ./configure --with-apache=../apache_1.3.22_accel/ \ --with-eapi=../mod_ssl-2.8.5-1.3.22/pkg.eapi/ make But if use mod_ssl then you can not to specify EAPI path - mod_ssl's configure set it on Apache source itself: cd ../mod_accel-1.0.7 ./configure --with-apache=../apache_1.3.22_accel/ make cd ../mod_deflate-1.0.9 ./configure --with-apache=../apache_1.3.22_accel/ make cd ../apache_1.3.22_accel/ EAPI_MM=../mm-1.1.3 SSLBASE=SYSTEM ./configure --enable-rule=EAPI \ --prefix=/usr/local/apache_accel --disable-rule=EXPAT \ --enable-module=most \ --enable-module=rewrite \ --activate-module=src/modules/accel/libaccel.a \ --activate-module=src/modules/extra/mod_deflate.o make make install mkdir /var/accelcache chown nobody:nobody /var/accelcache/ /usr/local/apache_accel/bin/apachectl startssl Now, in /usr/local/apache_accel/conf/httpd.conf, append the following: AccelCacheRoot /var/accelcache 1 AccelNoCacheon AccelPass/mail/http://127.0.0.1:8080/mail/ AccelWaitBeforeBodyRead 100 AccelUnlinkNoCached off AccelSetXHost on AccelSetXRealIP on AccelSetXURL on This creates an HTTP accelerator without any caching. I don't know much about the caching directives and haven't tried them out, so I can't provide any guidance there. The AccelCacheRoot directive sets the number of levels of subdirectories in the cache. 16 first level subdirectories named 0 .. f and 256 second level subdirectories named 00 .. ff are used by default (i.e. AccelCacheRoot path 1 2). Since I'm not caching, my config above does not specify any directory hashing (i.e. AccelCacheRoot path 1). AccelCacheRoot allow to set up to 3 levels of two type subdirectories - named 0 .. f and 00 .. ff. Also AccelCacheRoot has parameter 'noauto' that specify do not create automaticaly all nested subdirectories. They shoud be created before with create_cache script. Here's the config for mod_deflate: DeflateEnable On DeflateMinLength 3000 DeflateCompLevel 1 DeflateProxied Off This is default settings of DeflateCompLevel and DeflateProxied. DeflateHTTP 1.0 DeflateDisableRange MSIE 4. DeflateProxied Off means that anything with a 'Via' header is not proxied--Igor says that some proxies are broken so this is best to be safe. is not compressed And MSIE 4 apparently is a bit broken too. By default only text/html is compressed. DeflateCompLevel 1 provides adequate compression for text. Igor Sysoev
Re: Tips tricks needed :)
On Thu, 20 Dec 2001, Mark Fowler wrote: (sorry to break threading but I'm getting this from multiple lists) that IE 6 (beta at the time) considered my cookies to be third party because I used frame-based domain redirection and by default would not accept them. You need to include a P3P header in your HTTP header that contains a Compact Policy (CP) - a geek code of what your P3P xml privacy document contains. See http://www.w3c.org/P3P/. Some research I did seems to indicate that current implementations of IE6 will accept cookies no matter what CP you use (rather than checking it against your security settings and deciding if the CP represents a privacy policy that violates your chosen level of disclosure.) I'd really appreciate it other people could check this and confirm that IE6 is not offering any actual privacy level protection and is just discriminated against people that don't have P3P headers. I found that IE6 require P3P header with medium and higher security settings but CP content doesn't matter - it need simply P3P: CP='anything'. Igor Sysoev
Re[2]: Mason vs embperl
So I installed and compared. I preferred the syntax of Mason, the flexible way to build components, the caching ... it have to be said here that I choose Mason ... I agree, the caching is very good and one gets up and running in no time with Mason. However, I find it imposes too much of a coding style to the programmer : for example, all pages are evaluated inside the same package and thus one cannot define two normal subroutines with the same name in two different pages. Use the parser new() parameter 'in_package' Extract from the mason manual: Indicates the name of the package you wish your components to run in. This way different applications or virtual hosts can be run in different name spaces. Default is HTML::Mason::Commands. I simply decided to use subs only in *.pm files as libraries and so using allays the same name for the same functionality. Best Regards Christian - [EMAIL PROTECTED] -
Re: Report on mod_accel and mod_deflate
On Thu, 20 Dec 2001, Thomas Eibner wrote: On Thu, Dec 20, 2001 at 07:04:50AM -0500, Philip Mak wrote: AccelSet* adds X-* headers to the request to the backend. This is useful to know what the original request details were. In ftp://ftp.lexa.ru/pub/apache-rus/contrib/ (where I have been told to download mod_accel/mod_deflate from before), I see another file called mod_realip-1.0.tar.gz just released one week ago. From looking at the keywords in the documentation, it looks like a module to be installed on the backend httpd that will parse these X-* headers to retrieve the original IP address. I basically wrote something similar for the users of mod_proxy_add_forward 2-3 months ago, it's called mod_rpaf and sets r-connection-remote_ip and moved the X-Host: headers into the incoming Host: header and then updates the vhost structure so virtualhosting via mod_proxy_add_forward works. The module can be found at: http://stderr.net/apache/rpaf/ There is one drawback in setting r-connection-remote_addr. If you want to disable direct access to backend then you can't do it with mod_access - you need to configure firewall. Igor Sysoev
Re: Report on mod_accel and mod_deflate
On Thu, 20 Dec 2001, Igor Sysoev wrote: On Thu, 20 Dec 2001, Thomas Eibner wrote: On Thu, Dec 20, 2001 at 07:04:50AM -0500, Philip Mak wrote: AccelSet* adds X-* headers to the request to the backend. This is useful to know what the original request details were. In ftp://ftp.lexa.ru/pub/apache-rus/contrib/ (where I have been told to download mod_accel/mod_deflate from before), I see another file called mod_realip-1.0.tar.gz just released one week ago. From looking at the keywords in the documentation, it looks like a module to be installed on the backend httpd that will parse these X-* headers to retrieve the original IP address. I basically wrote something similar for the users of mod_proxy_add_forward 2-3 months ago, it's called mod_rpaf and sets r-connection-remote_ip and moved the X-Host: headers into the incoming Host: header and then updates the vhost structure so virtualhosting via mod_proxy_add_forward works. The module can be found at: http://stderr.net/apache/rpaf/ There is one drawback in setting r-connection-remote_addr. If you want to disable direct access to backend then you can't do it with mod_access - you need to configure firewall. Sorry, I did not notice RPAFproxy_ips. Igor Sysoev
Re: Report on mod_accel and mod_deflate
Jeremy Howard wrote: Igor Sysoev mentioned recently on this list that he has written a module called 'mod_accel' that provides a caching HTTP accelerator, as well as a mod_gzip replacement called 'mod_deflate'. These modules are both used on Kaspersky labs' busy sites, as well as at the popular portal http://www.rambler.ru. mod_deflate is used at around 700 sites. Igor, sorry to tell you but httpd-2.0 has introduced mod_deflate as a replacement for mod_gzip, so you are going to have a lot of confused users when httpd 2.0 hits the streets. I suggest that you raise this issue on the httpd dev list before it's too late. May be it's too late already, since there was already a long discussion about why it should be called deflate and not gzip (check the archives). The modules is located here: httpd-2.0/modules/experimental/mod_deflate.c _ 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: [VERY OT] How to Use Apache as a FTP server
I somehow missed the first part of this email thread (from anandr). The Apache::OpenIndex module (when loaded on the Apache server) provides a way to upload and download files using a http browsers. A demo is available at: http://www.xorgate.com/Apache/OpenIndex At 03:55 PM 12/19/2001 +0200, you wrote: That's not mod-perl. That's not even Apache. Many popular web browsers have browsing features for anonymous FTP. You need an FTP server for that. Apache 2 will include an FTP server (I think), but for now, try wuftpd. Issac anandr wrote: Hi All, I want to use my Apache as a ftp service also. Can the ring help me. I am running Apache 1.3.22 at port 80. when I give http:///, I get the list of files in my htdocs. Like wise when I give ftp:///, I need a list from my server folders. Have look at this address,for what I am intending to do,..ftp://tiger.com. With Regards, Anand Ratnasabapathy, DSM Soft(P)Ltd, No:25,Nungambakkam High Road, Chennai - 600 034. http://www.dsmsoft.com ++ | George Sanderson [EMAIL PROTECTED] | http://www.xorgate.com ++
Re: Tips tricks needed :)
Like this? (using register_cleanup instead of pnotes) Better to use pnotes. I started out doing this kind of thing with register_cleanup and had problems like random segfaults. I think it was because other cleanup handlers sometimes needed access to these resources. - Perrin
Re: Report on mod_accel and mod_deflate
IS == Igor Sysoev [EMAIL PROTECTED] writes: IS There is one drawback in setting r-connection-remote_addr. IS If you want to disable direct access to backend then you can't do it IS with mod_access - you need to configure firewall. I always bind my back-end to a private IP space (either localhost or a 192.168.* type address). -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-240-453-8497 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
Re: Tips tricks needed :)
At 10:50 19.12.01 +0200, you wrote: 4. [...] Ok, let's say we even somehow make these formulas general enough to use, but where shall the calculation take place? Postgres stored procs or in perl code/module (i think this) or even in TT? Constans will be in db. I tend to do calculations involving money in the database to avoid floating point rounding headaches. By the way, is there a perl module to do calculations with money? Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Report on mod_accel and mod_deflate
On Thu, 20 Dec 2001, Stas Bekman wrote: Jeremy Howard wrote: Igor Sysoev mentioned recently on this list that he has written a module called 'mod_accel' that provides a caching HTTP accelerator, as well as a mod_gzip replacement called 'mod_deflate'. These modules are both used on Kaspersky labs' busy sites, as well as at the popular portal http://www.rambler.ru. mod_deflate is used at around 700 sites. Igor, sorry to tell you but httpd-2.0 has introduced mod_deflate as a replacement for mod_gzip, so you are going to have a lot of confused users when httpd 2.0 hits the streets. I suggest that you raise this issue on the httpd dev list before it's too late. May be it's too late already, since there was already a long discussion about why it should be called deflate and not gzip (check the archives). Thank you. I'd overlooked it. Last time I saw discussion about mod_gzip and mod_gz in new-httpd list was September. By the way do you speak Russian ? Igor Sysoev
Re: Tips tricks needed :)
By the way, is there a perl module to do calculations with money? We use Math::BigInt to do fixed point. We couldn't get the other math modules to work a few years back. Our wrapper (Bivio::Type::Number) normalizes the rounding and allows subclasses to specify precision, decimals, min, max, etc. It's not fast, but fast enough. :-) It's part of bOP, which is available under the Artistic license from http://www.bivio.biz/hm/download-bOP We don't do too much math in the database, i.e. with PL/SQL and such. One thing we have done which has really helped is to define the sign of all amounts/quantities so that we can use SQL's SUM() function. Our database is normalized, which speeds development and reduces bugs. Using SUM() keeps queries fast (100MS) even processing ~1K rows to produce a portfolio. Cheers, Rob
Re: Tips tricks needed :)
By the way, is there a perl module to do calculations with money? There's Math::Currency. - Perrin
File handle, STDOUT, help
Please forgive me if this is in the documentation somewhere. I have been unable to find it. Also, please note, although I am not a novice at Perl, the more interesting uses of file handles, STDOUT, redirection and such are over my head. I'm having a problem with a mod_perl app I'm working on. The goal is to have a mod_perl app that zips up a bunch of files, and sends it to you, without creating any temporary files (The zips could get huge). I have it working, but the way I'm doing it, the number of bytes downloaded is not logged (well, it shows 5 bytes downloaded for a multi megabyte zip). I understand this, because I'm writing directly to the socket. What I don't understand is how to work around the problem... Here's the important segment of my code (Much cut out): sub handler { my $r = shift; my $c = $r-connection; my $fd = $c-fileno(); my $io = new IO::Handle; $io-fdopen ( $fd, w ); $io-autoflush(1); $zip-writeToFileHandle($io, 0); $io-close; I'm using Archive::Zip to zip the files up. It requires a file handle to write out to (or an actual file, but I don't want any temp files, I want to create zips on the file, and send them directly to the end user). The end goal: send the zip file, without using temp files, and log the size downloaded through normal apache logging (I have custom logging handler to log the info to a database, but the normal access log is showing only 5 bytes downloaded too). Thanks, - Tripp Donnelly - Systems Integrator - BG Telecommunications - www.BGTelecommunications.com - [EMAIL PROTECTED] - (314) 439-0100 ext 28
Fwd: SULFNBK.EXE Hoax
Symantec Security Response encourages you to ignore any messages regarding this hoax. It is harmless and is intended only to cause unwarranted concern. http://www.symantec.com/avcenter/venc/data/sulfnbk.exe.warning.html (Please forgive the spam.) __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com
apologies
-With sincere apologies, I just sent a message to my entire distribution list, forgetting that it included listservers. I'll try to avoid this mistake in the future. Paul __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com
Re: PerlWarn and syslog
On Thu, Dec 06, 2001 at 02:11:28PM -0800, Lance Uyehara wrote: I am using apache+mod_perl and have: ErrorLog syslog PerlWarn On However the warning don't come out. If I change to ErrorLog /var/log/logfile or something similar then the warning start appearing. How do I get the warnings when syslog is used? I've seen various problems with Apache's built in syslog under mod_perl. The solution that I've been using lately is: ErrorLog | logger -p local3.debug If you just print to STDERR you might want to look at Apage::LogSTDERR on CPAN. I took at look on CPAN and was unable to find this module or any reference to it. Any idea if it has been merged into some other module or if it has just gone away? Thanks, Lance
Re: PerlWarn and syslog
If you just print to STDERR you might want to look at Apage::LogSTDERR on CPAN. I took at look on CPAN and was unable to find this module or any reference to it. Any idea if it has been merged into some other module or if it has just gone away? over the years, the folks at critical path keep teasing with talk of releasing Apache::LogSTDERR, but I don't think anyone outside of CP (Doug, Brian, Paul) has actually seen it :) --Geoff
Re: Report on mod_accel and mod_deflate
Igor Sysoev wrote: On Thu, 20 Dec 2001, Stas Bekman wrote: Jeremy Howard wrote: Igor Sysoev mentioned recently on this list that he has written a module called 'mod_accel' that provides a caching HTTP accelerator, as well as a mod_gzip replacement called 'mod_deflate'. These modules are both used on Kaspersky labs' busy sites, as well as at the popular portal http://www.rambler.ru. mod_deflate is used at around 700 sites. Igor, sorry to tell you but httpd-2.0 has introduced mod_deflate as a replacement for mod_gzip, so you are going to have a lot of confused users when httpd 2.0 hits the streets. I suggest that you raise this issue on the httpd dev list before it's too late. May be it's too late already, since there was already a long discussion about why it should be called deflate and not gzip (check the archives). Thank you. I'd overlooked it. Last time I saw discussion about mod_gzip and mod_gz in new-httpd list was September. I think they have decided on this name somewhere in October, after a very long dispute of whether it should be a part of the core or a 3rd party module. By the way do you speak Russian ? I do :) _ 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/
mixing cgi-bin mod_perl
The scenario: There are two folders /cgi-binwith plain perl cgi /mod-perl with Apache::Registry scripts The application is being moved from cgi to mod_perl (Apache::Registry) one script at a time. My friend has a strange idea. He wants to mix cgi-bin mod_perl by testing all of the scripts in cgi-bin and putting one cgi-script at a time into mod-perl folder. He wants to do this internaly in Apache, changing the request for a particular script so for example when you reference /cgi-bin/some_scr.pl you actually end with /mod-perl/some_scr.pl. He doesn't want to change the a href code from html files to stop pointing at /cgi-bin. By moving all of them one at a time all of the application will eventually end up working under mod_perl. How can he do that ? He thought of using mod_proxy or mod_rewrite. The scripts are badly written and have been developed for three years so far by various perl programmers.
Re: mixing cgi-bin mod_perl
On Thu, Dec 20, 2001 at 09:41:31PM +0100, Miroslav Madzarevic wrote: The scenario: There are two folders /cgi-binwith plain perl cgi /mod-perl with Apache::Registry scripts The application is being moved from cgi to mod_perl (Apache::Registry) one script at a time. My friend has a strange idea. He wants to mix cgi-bin mod_perl by testing all of the scripts in cgi-bin and putting one cgi-script at a time into mod-perl folder. He wants to do this internaly in Apache, changing the request for a particular script so for example when you reference /cgi-bin/some_scr.pl you actually end with /mod-perl/some_scr.pl. He doesn't want to change the a href code from html files to stop pointing at /cgi-bin. By moving all of them one at a time all of the application will eventually end up working under mod_perl. How can he do that ? When he's still renaming the files he could do something like: Alias /cgi-bin/script1.pl /mod-perl/script1.pl And when he has moved them all just move the directory so it works from the original directory. -- Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/ mod_pointer http://stderr.net/mod_pointer
Re: mixing cgi-bin mod_perl
He wants to mix cgi-bin mod_perl by testing all of the scripts in cgi-bin and putting one cgi-script at a time into mod-perl folder. A very simple way to do this is to use Location directives to add them to PerlRun one at a time: Location /cgi-bin/some_scr.pl SetHandler perl-script PerlHandler Apache::PerlRun Options +ExecCGI #optional PerlSendHeader On ... /Location Location /cgi-bin/some_other_scr.pl SetHandler perl-script PerlHandler Apache::PerlRun Options +ExecCGI #optional PerlSendHeader On ... /Location These directives will override the broader directives for /cgi-bin/. You could use mod_macro (or Perl sections) to avoid all the duplicated typing. - Perrin
Re: mixing cgi-bin mod_perl
On Thu, Dec 20, 2001 at 09:41:31PM +0100, Miroslav Madzarevic wrote: The scenario: There are two folders /cgi-binwith plain perl cgi /mod-perl with Apache::Registry scripts The application is being moved from cgi to mod_perl (Apache::Registry) one script at a time. My friend has a strange idea. He wants to mix cgi-bin mod_perl by testing all of the scripts in cgi-bin and putting one cgi-script at a time into mod-perl folder. He wants to do this internaly in Apache, changing the request for a particular script so for example when you reference /cgi-bin/some_scr.pl you actually end with /mod-perl/some_scr.pl. He doesn't want to change the a href code from html files to stop pointing at /cgi-bin. By moving all of them one at a time all of the application will eventually end up working under mod_perl. How can he do that ? He thought of using mod_proxy or mod_rewrite. The scripts are badly written and have been developed for three years so far by various perl programmers. I'd use mod_rewrite or, even better, use the power of the PerlTransHandler.. Activate the following handler by adding PerlTransHandler Moo::my_trans_handler to your httpd.conf. In your example it will check for /usr/local/apache/cgi-bin/some_scr.pl_mod_perl_me If that file exists we rewrite the URL to use the /mod-perl prefix internally. sub Moo::my_trans_handler { my $r = shift; my $uri = $r-uri; return DECLINED unless ($uri =~ s,^/cgi-bin/,,); if (-f /usr/local/apache/cgi-bin/${uri}_mod_perl_me) { $uri = = /mod-perl/$uri $r-uri(/mod-perl/$uri); } return DECLINED; } -- Paul Lindner[EMAIL PROTECTED] | | | | | | | | | | mod_perl Developer's Cookbook http://www.modperlcookbook.org Human Rights Declaration http://www.unhchr.ch/udhr/index.htm
What phase am I in?
I've looked through the mod_perl docs and guide and am unable to find something that I can use in a handler to figure out what the current phase is. This seems like such an obvious thing that I can't believe it doesn't exist. Therefore I will conclude that I'm completely blind. Anyone care to open my eyes? -dave /*== www.urth.org We await the New Sun ==*/
Re: What phase am I in?
I've looked through the mod_perl docs and guide and am unable to find something that I can use in a handler to figure out what the current phase is. This seems like such an obvious thing that I can't believe it doesn't exist. Therefore I will conclude that I'm completely blind. Anyone care to open my eyes? http://mathforum.org/epigone/modperl/liphortwa/Pine.LNX.4.10.9909211217510.5 [EMAIL PROTECTED] It's called current_callback(). - Perrin
Re: What phase am I in?
On Thu, 20 Dec 2001, Perrin Harkins wrote: I've looked through the mod_perl docs and guide and am unable to find something that I can use in a handler to figure out what the current phase is. This seems like such an obvious thing that I can't believe it doesn't exist. Therefore I will conclude that I'm completely blind. Anyone care to open my eyes? http://mathforum.org/epigone/modperl/liphortwa/Pine.LNX.4.10.9909211217510.5 [EMAIL PROTECTED] It's called current_callback(). Grr, its not documented when I do 'perldoc Apache'. -dave /*== www.urth.org We await the New Sun ==*/
Re: mixing cgi-bin mod_perl
I would just use: find . -type f -print0 | xargs -0 perl -spi -e 's/cgi-bin\/some_scr.pl/mod-perl\/some_scr.pl/g;' Regards, Luciano Rocha -- Luciano Rocha, [EMAIL PROTECTED] The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen
[JOB] Webmaster with lite programming
The job is on site in Chicago and would require a wide range of talent, including , but not limited to: Ability to create/write/edit content for the web site Ability to work in a FreeBSD or Linux server environment Able to troubleshoot and modify existing code that someone else has created Able to extend other peoples work. The company looking to fill the position is currently running a mod_perl/Apache::ASP driven site so the amount of hard core mod_perl programming is almost null, I am hoping however that someone on this list may be the right person or know the right person to apply for this position. Please send resume and expected salary to [EMAIL PROTECTED]
Re: mixing cgi-bin mod_perl
Luciano == Luciano Miguel Ferreira Rocha [EMAIL PROTECTED] writes: Luciano I would just use: Luciano find . -type f -print0 | xargs -0 perl -spi -e 's/cgi-bin\/some_scr.pl/mod-perl\/some_scr.pl/g;' Ewww. Why two processes? use File::Find; @ARGV = (); find sub { push @ARGV, $File::Find::name if -f }, .; $^I = ; # or .bak while () { s/cgi-bin(\/some_scr.pl)/mod-perl$1/g; print; } -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: mixing cgi-bin mod_perl
On Thu, Dec 20, 2001 at 03:16:48PM -0800, Randal L. Schwartz wrote: Luciano find . -type f -print0 | xargs -0 perl -spi -e 's/cgi-bin\/some_scr.pl/mod-perl\/some_scr.pl/g;' Ewww. Why two processes? Because I would rather type only a single line to do what a 8 line program will do. What's the point of using perl if you aren't lazy? And then, what's the point of using perl if you can be even lazier? Perl extends the normal Unix Tools, but I won't drop them for perl just because it's the cool language of the moment... (Not that I don't like perl, mind you...) Regards, Luciano Rocha -- Luciano Rocha, [EMAIL PROTECTED] The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen
Re: mixing cgi-bin mod_perl
El Jue 20 Dic 2001 20:46, Luciano Miguel Ferreira Rocha escribió: On Thu, Dec 20, 2001 at 03:16:48PM -0800, Randal L. Schwartz wrote: Luciano find . -type f -print0 | xargs -0 perl -spi -e 's/cgi-bin\/some_scr.pl/mod-perl\/some_scr.pl/g;' Ewww. Why two processes? Because I would rather type only a single line to do what a 8 line program will do. What's the point of using perl if you aren't lazy? And then, what's the point of using perl if you can be even lazier? Perl extends the normal Unix Tools, but I won't drop them for perl just because it's the cool language of the moment... (Not that I don't like perl, mind you...) Regards, Luciano Rocha I think Randall is just trying to show a cool application of File::Find, and int the menatime save some CPU and memory cycles. I like it. Hans Poo
Re: mixing cgi-bin mod_perl
On Thu, Dec 20, 2001 at 09:29:26PM -0300, Hans Poo wrote: I think Randall is just trying to show a cool application of File::Find, and int the menatime save some CPU and memory cycles. Sorry, I didn't mean to be or sound harsh... My apologies to Randall and everybody on this list Regards, Luciano Rocha -- Luciano Rocha, [EMAIL PROTECTED] The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen
Re: Tips tricks needed :)
On Thu, 20 Dec 2001 11:51:30 -0500 Perrin Harkins [EMAIL PROTECTED] wrote: Like this? (using register_cleanup instead of pnotes) Better to use pnotes. I started out doing this kind of thing with register_cleanup and had problems like random segfaults. I think it was because other cleanup handlers sometimes needed access to these resources. I'll take care of it. Thanks for the input. -- Tatsuhiko Miyagawa [EMAIL PROTECTED]
Employment Inquiry
Reluctantly posting this inquiry. Pardon in advance. I'm a GNU software and infrastructure engineer looking for work in Northern California (Bay area). Please let me know if I can help out in a full time or per project basis. See http://.CyberShell.com/resume Thank you -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -
cvs commit: modperl-site/guide install.html
stas01/12/20 23:43:38 Modified:guideinstall.html Log: s|www.perl.com/CPAN-local|www.cpan.org|g as the later doesn't feature multiplexing Revision ChangesPath 1.23 +1 -1 modperl-site/guide/install.html Index: install.html === RCS file: /home/cvs/modperl-site/guide/install.html,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- install.html 2001/11/15 09:04:50 1.22 +++ install.html 2001/12/21 07:43:38 1.23 @@ -3674,7 +3674,7 @@ td pre Running make for DOUGM/mod_perl-x.xx.tar.gz Fetching with LWP: - A HREF=http://www.perl.com/CPAN-local/authors/id/DOUGM/mod_perl-x.xx.tar.gz;http://www.perl.com/CPAN-local/authors/id/DOUGM/mod_perl-x.xx.tar.gz/A + A HREF=http://www.cpan.org/authors/id/DOUGM/mod_perl-x.xx.tar.gz;http://www.cpan.org/authors/id/DOUGM/mod_perl-x.xx.tar.gz/A CPAN.pm: Going to build DOUGM/mod_perl-x.xx.tar.gz