redirecting stderr to database/external script

2013-04-29 Thread Ryan Perry
I'm trying to redirect my errors to another script to log them. I have my access log redirected, but errors still go to httpd-error.log. How can I do this? -- *Ryan Perry* Technology Director RestoreHealth 1289 Deming Way Madison, WI 53717 608.833.7046 ext 700 rpe...@restorehc.com

Re: redirecting

2006-04-15 Thread Maxime Zakharov
Octavian Rasnita wrote: Is the following code correct? $r->headers_out->set(Location => '/ss'); I have seen that if the "http://"; and the host name is not given, Internet Explorer displays the page correctly, but I don't know if this will work with all the browsers. If you know more, please p

redirecting

2006-04-15 Thread Octavian Rasnita
Hi, Is the following code correct? $r->headers_out->set(Location => '/ss'); I have seen that if the "http://"; and the host name is not given, Internet Explorer displays the page correctly, but I don't know if this will work with all the browsers. If you know more, please point me to some pages

Re: Why is err_header_out needed to set cookies when redirecting?

2006-02-15 Thread Sam Tregar
On Wed, 15 Feb 2006, Geoffrey Young wrote: in short, because anything other than 200 is considered an error. so REDIRECT (302) forces apache to use the err_headers_out table instead of the headers_out table. why does Location work in headers_out, then, you ask? well, it's an exception to the

Re: Why is err_header_out needed to set cookies when redirecting?

2006-02-15 Thread Geoffrey Young
Sam Tregar wrote: > Hello all. Check out this bug: > > my $r = Apache->request; > $r->header_out(Set-Cookie => '...cookie here...' ); > $r->header_out(Location => '...url here...'); > return REDIRECT; > > Now, we all know that second line has to be err_header_out not > he

Re: Why is err_header_out needed to set cookies when redirecting?

2006-02-15 Thread Sam Tregar
On Wed, 15 Feb 2006, Michael Peters wrote: Now, we all know that second line has to be err_header_out not header_out, or Apache will silently ignore the Set-Cookie directive. I knew it as soon as I saw it, although I couldn't explain why and thus didn't trust my intuition. I looked through the

Re: Why is err_header_out needed to set cookies when redirecting?

2006-02-15 Thread Michael Peters
Sam Tregar wrote: > Hello all. Check out this bug: > > my $r = Apache->request; > $r->header_out(Set-Cookie => '...cookie here...' ); > $r->header_out(Location => '...url here...'); > return REDIRECT; > > Now, we all know that second line has to be err_header_out not > he

Why is err_header_out needed to set cookies when redirecting?

2006-02-15 Thread Sam Tregar
Hello all. Check out this bug: my $r = Apache->request; $r->header_out(Set-Cookie => '...cookie here...' ); $r->header_out(Location => '...url here...'); return REDIRECT; Now, we all know that second line has to be err_header_out not header_out, or Apache will silently ign

Re: redirecting

2005-10-02 Thread ___cliff rayman___
Michael Hall wrote: Try simply: $r->headers_out->set(Location => 'to-URI'); make sure 'to-URI' is absolute and not relative as per the RFC's. I have had some problems with relative URI's since Apache tends to want to optimize the call. Instead of sending the 302 headers to the browser,

Re: redirecting

2005-10-01 Thread Michael Hall
Try simply: $r->headers_out->set(Location => 'to-URI'); return Apache2::Const::REDIRECT; The status of 302 is set automatically and my browsers reflect the new address. apache sends: HTTP/1.1 302 Found Date: Sun, 02 Oct 2005 06:00:12 GMT Server: Apache Location: to-URI Content-Length: 290 Conten

redirecting

2005-09-30 Thread Octavian Rasnita
Hi, I am trying to redirect a request to another location and the following code works, but the new location is not printed in the address bar. $r->status_line('302 Moved'); $r->headers_out->add('Location' => 'http://localhost/'); return Apache2::Const::OK; return Apache2::Const::REDIRECT; #give

Re: redirecting a post (or vice versa)

2005-08-11 Thread Perrin Harkins
g, except we need a POST method > because the data is quite big (and because we want to re-code as little > as possible at backend). You can't redirect a POST. You can fake it by redirecting to a GET, although you just said the data is too big, or you can store the data on the server-

redirecting a post (or vice versa)

2005-08-11 Thread allan juul
hi this is not a specific mod_perl question, but i wonder if it could be done at all. we have a reverse proxy scenario (via mod_rewrite) with an apache2 frontend and IIS6 on another machine as backend. we want a dual login to the site and we want the backend to handle the login. 1) we ha

Re: redirecting log to screen

2004-11-30 Thread Stas Bekman
[Marc, please always reply to the list] Marc Lambrichs wrote: Sorry. mp1. OK, then subclass Apache::Log (actually it is the same under both generations) I've written a utility module that uses a $r->log object to log my request using my own debug, info, notice etc. methods. Instead of writing t

Re: redirecting log to screen

2004-11-30 Thread Stas Bekman
Marc Lambrichs wrote: I've written a utility module that uses a $r->log object to log my request using my own debug, info, notice etc. methods. Instead of writing to a log file, I want to redirect all log messages to the client for a specific module that uses this log utility. What's the best w

redirecting log to screen

2004-11-30 Thread Marc Lambrichs
I've written a utility module that uses a $r->log object to log my request using my own debug, info, notice etc. methods. Instead of writing to a log file, I want to redirect all log messages to the client for a specific module that uses this log utility. What's the best way to arrange this?

RE: Setting cookie and Redirecting requests...

2003-09-24 Thread simran
Hi Frank, Thankyou very much for sugessition. It works perfectly, except that i had to change $r->headers_out(...) to $r->err_headers_out(...) (not sure why, could have been a testing problem on my end...) I was hoping to not use a PerlTransHandler as then for every request i will be running tha

Setting cookie and Redirecting requests...

2003-09-23 Thread simran
Hi All, What i am trying to do is: * If a user goes to http://myhost/[A-Za-z]{3}[0-9]{3} (eg. http://myhost/abc123) Then i want to redirect them to "/" and set their cookie based on where they tried to go (eg. set cookie Referer=abc123) To do the above, i setup the following apache con