Re: Problems with Apache::compat and german special chars
one more patch on Apache::compat. When SUBMITING-Forms a whitespace(\s+) is replaced by +. We have to retransform this. Am Son, 2002-12-08 um 21.46 schrieb Tom Schindl: Problems with Apache::compat CGI-PARAM-STRING: header=%DC%DC%DC%DCbody=%D6%D6%D6%D6type=save_thread cut-- [Sun Dec 08 21:39:09 2002] [error] [client 127.0.0.1] Character in c format wrapped at /usr/bestsolution/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache2/Apache/compat.pm line 217. , referer: http://localhost/discussion-board cut-- When I copy the lines of interest into a small perl program and execute it, everything works perfectly. What's going wrong there? cut-- map { s/%([0-9a-fA-F]{2})/pack(c,hex($1))/ge; $_; } split /[=;]/, $string, -1 cut-- thx tom -- Tom Schindl [EMAIL PROTECTED] bestsolution.at 215,216c215,218 $string =~ s/\+/ /g; return map { s/%([0-9a-fA-F]{2})/chr(hex($1))/ge; $_; } split /[=;]/, $string, -1; --- return map { s/%([0-9a-fA-F]{2})/pack(c,hex($1))/ge; $_; } split /[=;]/, $string, -1;
Re: Apache 2?
GC == Grant Cooper [EMAIL PROTECTED] writes: GC Is there any documention of a HOWTO or a tutorial about a lightweight GC front-end proxy that loads the data from the mod_perl try this: perldoc mod_perl_tuning It comes with mod_perl, conveniently. Nobody has sent me any updates in two years, so I assume nobody has come up with anything better ;-) I still use the proxypass thing with front end running SSL and back end doing all the heavy lifting in Template Toolkit. I call that my application server to let the buzz-word compliant be happy. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 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/
CGI.pm's path_info will not stay shared
Folks I'm aware of this doc: http://perl.apache.org/docs/general/perl_reference/perl_reference.html Click on: 'my() Scoped Variable in Nested Subroutines' for details. and I've just had a similar experience with $q - path_info(). Context: In this environment: Win2K, Apache 1.3.26, mod_perl 1.27_01-dev, Perl 5.6.1, CGI.pm 2.89,the CGI method path_info(), when given a URL without any path info, returns the path info from the previous submit, but only if the CGI script is running as an Apache::Registry script.When the CGI script is run as a simple cgi-bin script, this bug is not manifest.This is very like the behavior of my()-scoped variables in nested subroutines, documented above. Under Perl 5.8.0, Apache 2.0.43 the problem does not occur. Is this a known problem? If so, I suggest it be added to the docs. -- Cheers Ron Savage, [EMAIL PROTECTED] on 11/12/2002 http://savage.net.au/index.html
Per Vhost @INC
This has come up a few times but I still do not fully understand how it works. Here is my situation. I have a body of software that runs in a specific namespace with about 10 libraries. (TourEngine::**). I have many versions of this software and will need the ability to, on the same server, run multiple instances of this software with different versions for a variety of reasons. Using a PerlRequire in the vhost seems to add the @INC for the entire vhost population on the server, not just my vhost. This results in 'first match wins' behavior since I would now have an @INC entry for each TourEngine::** directory. I tried Apache::PerlVINC but it wants to reload each module on each request and it seems to want to 'own' a location space. My modules actually get required as part of my HTML::Mason code, they do not handle the entire Location. I tried the PerlFixupHandler and a use libs declaration but that just gave me error messages like 'Undefined subroutine lib(use::handler called.' which makes me think I have the syntax wrong there and I can not find another syntax example. My preference is not to have to set my @INC in every component/lib I call but to have it set in the config globally for that Vhost. So, does anyone have any ideas on how I can load a per vhost @INC that doesn't appear to other Vhosts? I want my TourEngine::** namespace to be a unique @INC per vhost. Thanks John-
Re: Per Vhost @INC
I think you are confusing @INC and %INC. You should probably read up on the difference between the two. The mod_perl guide provides a lot of background on this issue: http://perl.apache.org/docs/general/perl_reference/perl_reference.html#use__ __requiredo_INC_and__INC_Explained In any case, @INC and %INC are only used to load modules. You can't have multiple versions of the same package loaded at the same time in a single interpreter (even outside of mod_perl) since the symbols in the symbol table can only point to one thing at a time. Remember that there's only one Perl interpreter per child process (in Apache/mod_perl 1.x). If you try to load the same package again via `require' you'll overwrite the old symbols and, if you have warnings on, generate a bunch of redefine warnings. As you discovered, Apache::PerlVINC is just a work-around that reloads every module (at least those that you say matter) on every request. That's the best you can do unless Perl starts supporting some method of side-by-side versioning of modules. -- Kyle Oppenheim Tellme Networks, Inc. http://www.tellme.com - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 10, 2002 5:29 PM Subject: Per Vhost @INC This has come up a few times but I still do not fully understand how it works. Here is my situation. I have a body of software that runs in a specific namespace with about 10 libraries. (TourEngine::**). I have many versions of this software and will need the ability to, on the same server, run multiple instances of this software with different versions for a variety of reasons. Using a PerlRequire in the vhost seems to add the @INC for the entire vhost population on the server, not just my vhost. This results in 'first match wins' behavior since I would now have an @INC entry for each TourEngine::** directory. I tried Apache::PerlVINC but it wants to reload each module on each request and it seems to want to 'own' a location space. My modules actually get required as part of my HTML::Mason code, they do not handle the entire Location. I tried the PerlFixupHandler and a use libs declaration but that just gave me error messages like 'Undefined subroutine lib(use::handler called.' which makes me think I have the syntax wrong there and I can not find another syntax example. My preference is not to have to set my @INC in every component/lib I call but to have it set in the config globally for that Vhost. So, does anyone have any ideas on how I can load a per vhost @INC that doesn't appear to other Vhosts? I want my TourEngine::** namespace to be a unique @INC per vhost. Thanks John-