Re: Re: $r-headers_out Location and Set-Cookie
Hi, I've seen that the key is the status returned to apache. With Apache::REDIRECT i have the next code works ok $apache-err_headers_out-{'Set-Cookie'} = $value1; $apache-err_headers_out-{'Location'} = $value2; But exactly what's the difference between err_headers_out and headers_out? I understand that the first is related with an error message sended by headers, but i mean, really what does apache make different? I find there is poor docs about that ... maybe i don't know where are the good docs??? - Original Message - Ahh, didn't know that.. Thanks Stas! -Chris - Original Message - From: Stas Bekman To: Chris Faust Cc: ; Sent: Sunday, August 10, 2003 2:37 PM Subject: Re: $r-headers_out Location and Set-Cookie Chris Faust wrote: I haven't had any problems setting a cookie and redirecting on MP2 by using the below $r-err_headers_out-add('Set-Cookie' = $packed_cookie); $r-header_out('Location' = $url); $r-status(REDIRECT); $r-send_http_header; That's when you use Apache::compat, doing the mp1 syntax. In mp2- speak that would be: $r-err_headers_out-add('Set-Cookie' = $packed_cookie); $r-headers_out-set('Location' = $url); $r-status(REDIRECT); notice that you don't need to call $r-send_http_header, it doesn't exist in mp2. - Un nuevo buscador más rápido, eficaz y sencillo http://www.plaf.com Ya.com ADSL Home 24h, Módem + Alta + 1 mes Gratis http://acceso.ya.com/adslhome24h/
$r-headers_out Location and Set-Cookie
I have the next problem, i am in page A that form points to page B, that is a modperl2 handler. This handler makes a job and decides to send a cookie to the browser, and after to redirect to the same page A who is ready to catch the cookie. Then the problem is that if i put the two headers, i don't have the cookie posted, but if i comment the Location header, then i stay at perl handler location, and if i go manually to page A then i see that the cookie is posted. So why these two headers doesn't respect themselves? Resuming $r-headers_out-{'Set-Cookie'} = $cookie; $r-headers_out-{'Location'} = $url; Redirects the page to $url but cookie is not seen by browser $r-headers_out-{'Set-Cookie'} = $cookie; #$r-headers_out-{'Location'} = $url; Location is the perl handler 'localhost/pageB/' (perl handler), if you then go to localhost/pageA (or simply click BACK button) then the browser DO see the cookie! Any idea? - Un nuevo buscador más rápido, eficaz y sencillo http://www.plaf.com Ya.com ADSL Home 24h, Módem + Alta + 1 mes Gratis http://acceso.ya.com/adslhome24h/
handlers versus scripts, SSI difference
I began some weeks ago to think about translating my .pl scripts (that run with mod_perl 2 ::registry) to perl handlers. My first problem was to find how to include a perl handler as i included my cgi scripts (include virtual). I found that #perl directive allows you to include with Apache::include the same registry scripts, but making it faster. I also note that in fact you could include any perl handler with that #perl directive. But it seems to be that with modperl as DSO this directive does not work, and that Apache::include is only a modperl1.x funcionality, so discarted in mod perl 2. I have had problems building modperl as a static module. Finally i could build as static module and as DSO module (mod_perl.a and mod_perl.so) but i didn't have modperl enabled without loadmodule mod_perl.so, so static version is not running. Windows binaries are all DSO, and i don't have VB to compile. And i've read that compiling mod_perl statically doesn't allow you to compile other DSO modules after. Then i think, if DSO is the comfortable way to do things (not in practical but in concept), how can i include a perl handler in my HTML page? I know there are modules like MASON or similar, and now i will enter to input and output filters, but comparing with the easiest way of Include virtual registry scripts i begin to think that perl handlers in mod perl lose here against cgi simple scripts. So this is my question. Are perlhandlers better than CGI registry scripts in speed but not in funcionality??? as i think CGI people uses to include their scripts a lot!! - Un nuevo buscador más rápido, eficaz y sencillo http://www.plaf.com Ya.com ADSL Home 24h, Módem + Alta + 1 mes Gratis http://acceso.ya.com/adslhome24h/
make test fails in building modperl2+apache2+perl5.8
Hi everyone (my first message). The message is that there is a syntax error in line x of some conf file, the syntax error is that PerlSwitches is an unknown command. I am trying to compile modperl2 with perl 5.8 compiles with mpm and ithreads and with apache2 compiled not as a DSO module but as static part of the executable. But i get this error, what can it be? I'm using suse linux 8.0 Another thing is that i compiled perl with i686-linux, but i used to think i was i386, as i686 was the default i leave as it. Anyway i don't think it has any importance. Any idea? Extra info: I want to compile as static module because with DSO option #perl directive doesn't work. - Un nuevo buscador más rápido, eficaz y sencillo http://www.plaf.com Ya.com ADSL Home 24h, Módem + Alta + 1 mes Gratis http://acceso.ya.com/adslhome24h/