Help me with an url rewrite
I'm not sure if I've asked the correct lists,but hope I can get some helps here.:) I need a mod_rewrite rule,rewrite this url: http://abc.site.com/index.php?q1=v1 to: http://www.site.com/index.php?q1=v1&domain=abc I applicated this rule: RewriteEngine on RewriteRule ^/(.+)$ http://www.site.com/$1&domain=abc But I'm faint I can't get the correct result,it rewrote the url to: http://www.site.com/index.php&domain=abc?q1=v1 (not http://www.site.com/index.php?q1=v1&domain=abc) This disorder the things,I do hate it. Can you show me a correct way?thanks. Check out the new free AOL Email -- 2GB of storage and industry-leading spam and email virus protection.
Re: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
Hi all, A little more tests reveal the following: If Apache was not installed in the default location (c:\program files\apache foundation\apache2.2) and instead installed into a path that does not have spaces (eg. c:\Apache2.2), while restarting will still fail, you can manually start the service again much faster; almost immediately after it stops. It is possible to write a monitoring windows service to start the apache service if it detects that it has stopped, but it's not quite the elegent solution that people want to hear about. So while it's better, it's still not good enough. Apache must still be able to perform a restart on its own. Any suggestions? Foo JH wrote: Hi all, I am rather disappointed (and a little frustrated as well) on modperl's inability to survive an Apache restart on the Windows platform. The platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) + modperl2 + libapreq2 I have come to accept the fact that once in a while modperl on Win32 will segfault, but the old Apache I tried (year 2005 iirc) seems to recover, though it threw a windows fault dialog that scared the wits out of my clients. But this time it's just unacceptable. The odd thing is, if you try to start apache after it failed, it will fail again. You have to wait about a minute (or more) before starting the server. I don't mind any creative workarounds. Please share with me any suggestions or tips that can circumvent this. Thanks much.
Using perl source code filter in mod_perl2
Is it possible to use perl source code filters (like Filter::Util::Call) in scripts that are run via ModPerl::Registry? If I place the following module somewhere in my @INC path: Hello2Goodbye.pm package Hello2Goodbye; use Filter::Util::Call; sub import { my $type = shift; filter_add(bless []); } sub filter { my $self = shift; my $status; s/Hello/Goodbye/g if ($status = filter_read()) > 0; return $status; } 1; and then run the following script via ModPerl::Registry: filtertest1.pl -- use Hello2Goodbye; print "Content-Type: text/html\n\n"; print "Filter Test\n"; print "Hello, world.\n"; print "\n"; then I get the output "Hello, world." rather than "Goodbye, world.", i.e. the source code didn't get filtered. I can make it work by rewriting the script as: filtertest2.pl -- use FilterTest; FilterTest::greeting(); where the FilterTest module contains: FilterTest.pm - use Hello2Goodbye; package FilterTest; sub greeting() { print "Content-Type: text/html\n\n"; print "Filter Test\n"; print "Hello, world.\n"; print "\n"; } 1; but I'd really like the scripts themselves to be source-filtered too, not just the modules that they use. Any ideas?
Re: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
On Fri, 10 Aug 2007, Foo JH wrote: Hi all, A little more tests reveal the following: If Apache was not installed in the default location (c:\program files\apache foundation\apache2.2) and instead installed into a path that does not have spaces (eg. c:\Apache2.2), while restarting will still fail, you can manually start the service again much faster; almost immediately after it stops. It is possible to write a monitoring windows service to start the apache service if it detects that it has stopped, but it's not quite the elegent solution that people want to hear about. So while it's better, it's still not good enough. Apache must still be able to perform a restart on its own. Any suggestions? Someone told me privately that using Apache/2.2.4 (the latest version) helps with this problem. -- best regards, Randy Kobes
Re: copilation command
Prapulla, Please see how others ask questions on this list. You need to provide sufficient details. Your question doesn't even make much sense. There is nothing to 'compile' in mod-perl, unlike java and C#. What are you trying to achieve? - Praveen - Original Message From: prapulla rani <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]; modperl@perl.apache.org Sent: Friday, August 10, 2007 8:27:14 AM Subject: copilation command hi what is the compilation command for modperl in cygwin and also debugging command -- www.g-billbords.com
Re: Help me with an url rewrite
Thank you.it works perfectly. -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED]; modperl@perl.apache.org Sent: Fri, 10 Aug 2007 6.16PM Subject: Re: Help me with an url rewrite Hello, well this is more of a mod_rewrite question. The problem is that you have to use the QUERY_STRING variable in order to access parameters, these are not part of the normal scope of the RewriteCond / RewriteRule stuff. Refer to the mod_rewrite guide for that. We use this to append a user ID to the request: RewriteCond %{QUERY_STRING} . RewriteCond %{QUERY_STRING} !^userid= RewriteRule ^/.* /our_server/?userid=user32&%{QUERY_STRING} [R,L] So in your case you should try (untested) RewriteEngine on RewriteRule ^/(.+)$ http://www.site.com/%{QUERY_STRING}&domain=abc Hope this helps. Nils [EMAIL PROTECTED] schrieb: > I'm not sure if I've asked the correct lists,but hope I can get some helps here.:) > > I need a mod_rewrite rule,rewrite this url: > http://abc.site.com/index.php?q1=v1 > to: > http://www.site.com/index.php?q1=v1&domain=abc > > I applicated this rule: > > RewriteEngine on > RewriteRule ^/(.+)$ http://www.site.com/$1&domain=abc > > > But I'm faint I can't get the correct result,it rewrote the url to: > > http://www.site.com/index.php&domain=abc?q1=v1 > > (not http://www.site.com/index.php?q1=v1&domain=abc) > > This disorder the things,I do hate it. > > Can you show me a correct way?thanks. > > Check out the new free AOL Email -- 2GB of storage and > industry-leading spam and email virus protection. > Check out the new free AOL Email -- 2GB of storage and industry-leading spam and email virus protection.
Re: SV: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
Hello Henrik, Yes we have conversed earlier and shared the pain on this same point. My FreeBSD installations were relatively painless in comparison to the Win32 counterparts. The sad truth is that my clients are more comfortable with Windows OS, and I have to support our products on this platform. It's either I get modperl to work, or we have a product overhaul to move over to .NET (which I hope will not happen). It's quite strange that nobody else has this problem. It's definately a critical operational concern. I am starting to suspect that Perl/ modperl is quietly exclusive to the non-Windows world. I hope someone in this community can prove me wrong... Henrik Schak Hansen wrote: Hi Foo I finally gave up on Apahce/modperl2 on win32 in various version combinations. I kept hoping that newer versions of apache/modperl would stabilize it but rather it seemed to get worse. Daily apache/modperl would fail and modperl would restart maybe 10 time within a few minutes before finally working again. Only because I have a load balancer in front of several web servers have I been able to keep going. Anyway, now I have moved to Linux a week ago, and so fare I haven't experienced any problems (except having to tweak different parameters). So I cross my fingers and hope it will stay this way. Not much of help for you I know, but I remember we have talked about this before Regards Henrik Schak Hansen -Oprindelig meddelelse- Fra: Foo JH [mailto:[EMAIL PROTECTED] Sendt: 10. august 2007 10:10 Til: modperl@perl.apache.org Emne: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure Hi all, I am rather disappointed (and a little frustrated as well) on modperl's inability to survive an Apache restart on the Windows platform. The platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) + modperl2 + libapreq2 I have come to accept the fact that once in a while modperl on Win32 will segfault, but the old Apache I tried (year 2005 iirc) seems to recover, though it threw a windows fault dialog that scared the wits out of my clients. But this time it's just unacceptable. The odd thing is, if you try to start apache after it failed, it will fail again. You have to wait about a minute (or more) before starting the server. I don't mind any creative workarounds. Please share with me any suggestions or tips that can circumvent this. Thanks much. --- [Denne E-mail blev scannet for virus af Declude Virus] [This E-mail was scanned for viruses by Declude Virus]
SV: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
Hi Foo I finally gave up on Apahce/modperl2 on win32 in various version combinations. I kept hoping that newer versions of apache/modperl would stabilize it but rather it seemed to get worse. Daily apache/modperl would fail and modperl would restart maybe 10 time within a few minutes before finally working again. Only because I have a load balancer in front of several web servers have I been able to keep going. Anyway, now I have moved to Linux a week ago, and so fare I haven't experienced any problems (except having to tweak different parameters). So I cross my fingers and hope it will stay this way. Not much of help for you I know, but I remember we have talked about this before Regards Henrik Schak Hansen -Oprindelig meddelelse- Fra: Foo JH [mailto:[EMAIL PROTECTED] Sendt: 10. august 2007 10:10 Til: modperl@perl.apache.org Emne: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure Hi all, I am rather disappointed (and a little frustrated as well) on modperl's inability to survive an Apache restart on the Windows platform. The platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) + modperl2 + libapreq2 I have come to accept the fact that once in a while modperl on Win32 will segfault, but the old Apache I tried (year 2005 iirc) seems to recover, though it threw a windows fault dialog that scared the wits out of my clients. But this time it's just unacceptable. The odd thing is, if you try to start apache after it failed, it will fail again. You have to wait about a minute (or more) before starting the server. I don't mind any creative workarounds. Please share with me any suggestions or tips that can circumvent this. Thanks much. --- [Denne E-mail blev scannet for virus af Declude Virus] [This E-mail was scanned for viruses by Declude Virus]
[mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
Hi all, I am rather disappointed (and a little frustrated as well) on modperl's inability to survive an Apache restart on the Windows platform. The platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) + modperl2 + libapreq2 I have come to accept the fact that once in a while modperl on Win32 will segfault, but the old Apache I tried (year 2005 iirc) seems to recover, though it threw a windows fault dialog that scared the wits out of my clients. But this time it's just unacceptable. The odd thing is, if you try to start apache after it failed, it will fail again. You have to wait about a minute (or more) before starting the server. I don't mind any creative workarounds. Please share with me any suggestions or tips that can circumvent this. Thanks much.
Re: Help me with an url rewrite
Hello, well this is more of a mod_rewrite question. The problem is that you have to use the QUERY_STRING variable in order to access parameters, these are not part of the normal scope of the RewriteCond / RewriteRule stuff. Refer to the mod_rewrite guide for that. We use this to append a user ID to the request: RewriteCond %{QUERY_STRING} . RewriteCond %{QUERY_STRING} !^userid= RewriteRule ^/.* /our_server/?userid=user32&%{QUERY_STRING} [R,L] So in your case you should try (untested) RewriteEngine on RewriteRule ^/(.+)$ http://www.site.com/%{QUERY_STRING}&domain=abc Hope this helps. Nils [EMAIL PROTECTED] schrieb: I'm not sure if I've asked the correct lists,but hope I can get some helps here.:) I need a mod_rewrite rule,rewrite this url: http://abc.site.com/index.php?q1=v1 to: http://www.site.com/index.php?q1=v1&domain=abc I applicated this rule: RewriteEngine on RewriteRule ^/(.+)$ http://www.site.com/$1&domain=abc But I'm faint I can't get the correct result,it rewrote the url to: http://www.site.com/index.php&domain=abc?q1=v1 (not http://www.site.com/index.php?q1=v1&domain=abc) This disorder the things,I do hate it. Can you show me a correct way?thanks. Check out the new free AOL Email -- 2GB of storage and industry-leading spam and email virus protection.
copilation command
hi what is the compilation command for modperl in cygwin and also debugging command -- www.g-billbords.com
Re: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
Foo JH wrote: > Hi all, > > I am rather disappointed (and a little frustrated as well) on modperl's > inability to survive an Apache restart on the Windows platform. The > platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) + > modperl2 + libapreq2 Foo - I'm honesty clueless. I've seen no issues. Issues with running very crufty perl or php over time, but not restart issues. This probably has nothing to do with either Apache, Perl or mod_perl. It's most likely DB clients or something you've instantiated that is still running/shutting down for that minute you observed. If you crank down your loglevel to debug, can you determine anything more about your particular situation?
Re: SV: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure
On 8/10/07, Foo JH <[EMAIL PROTECTED]> wrote: > The sad truth is that my clients are more comfortable with Windows OS Is it possible that if they have a small enough site to run comfortably on Windows, they can run it through CGI? I suspect that whatever issue you're having with mod_perl could be fixed, but it seems pointless to fight with it if the site has low traffic and can run as CGI. - Perrin
Correct way to upload a file
Hi All, I have just started learning perl and mod_perl, and I must admit I am enjoying it a lot! I am tying to upload a file, so I can do some calculations to the file, my question is what is the "correct" and most "efficient" way to upload the file, and perform the calculations? Should I consider using the CGI module? TIA
Re: Correct way to upload a file
On Aug 10, 2007, at 10:25 PM, Mag Gam wrote: I have just started learning perl and mod_perl, and I must admit I am enjoying it a lot! I am tying to upload a file, so I can do some calculations to the file, my question is what is the "correct" and most "efficient" way to upload the file, and perform the calculations? Should I consider using the CGI module? libapreq http://httpd.apache.org/apreq/ CGI is a close second
compile
hi how can we compile modperl programs in cygwin. -- www.g-billboards