[Newbie] MP2.0: PerlSendHeader versus PerlOptions (and Apache::Registrygrrr...)
[Newbie] MP2.0: PerlSendHeader versus PerlOptions (and Apache::Registrygrrr...)
am 25.04.2008 06:18:18 von Perl Junkie
This is a multi-part message in MIME format.
--------------090004030902090109070803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Okay, it's been a while, despite the name, that I've done any serious
playing around with MP. Since 1.0. I've just installed and gotten
running MP 2.0 on Apache 2.2.8... I'm doing the "ground up" and trying
to get registry scripts working first and I've run into the following,
right-off-the-bat head scratchers:
(1) The documentation says that:
|ParseHeaders|
Scan output for HTTP headers, same functionality as mod_perl 1.0's
|PerlSendHeader|, but more robust. This option is usually needs to
be enabled for registry scripts which send the HTTP header with:
print "Content-type: text/html\n\n";
Doesn't work for me... When I run registry scripts using in httpd.conf:
Alias /mp "/var/www/mp"
PerlModule ModPerl::Registry
SetHandler perl-script
Options +ExecCGI
PerlHandler ModPerl::Registry
*PerlOptions ParseHeaders*
Order allow,deny
Allow from all
The content-type is never sent and the response delivers text/plain -- I
see the HTML in plain text. When I go back to the MP 1.0 way in
httpd.conf, it works:
Alias /mp "/var/www/mp"
PerlModule ModPerl::Registry
SetHandler perl-script
Options +ExecCGI
PerlHandler ModPerl::Registry
*PerlSendHeader On*
Order allow,deny
Allow from all
What's the story here....?
ALSO...
(2) It took me a while to figure out that Apache::Registry has become
ModPerl::Registry. I saw nothing and still see nothing in the MP 2.0
docs about this, what I would consider MAJOR change, and as I said, it
took me a while to realize what happened here... What gives? What was
wrong with Apache::Registry???
I had Stas' book, which I know was written during MP 1.0, so between
these two things, it leaves me wondering how much more of the book is
now practically worthless?? I'm fast beginning to feel MP 2.0 has now
become the domain of "old MP 1.0 hands" and if you didn't follow MP from
1.0 days -- which I did not in a consistent way, then you are out of
luck... Where can I get the latest MP 2.0 beef? I think the MP 2.0
documentation at perl.apache.org leaves a lot to be desired...
Anyways, if someone can explain the ParseHeaders versus PerlSendHeader
and the ModPerl::Registry versus Apache::Registry changes, that would
help at least get registry scripts running in the optimal way. If the
MP 2.0 docs say that ParseHeaders is better, than I'd like to be able to
use it, but right now, it doesn't seem to work as the docs say. :-(
-PJ
--------------090004030902090109070803
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Okay, it's been a while, despite the name, that I've done any serious
playing around with MP. Since 1.0. I've just installed and gotten
running MP 2.0 on Apache 2.2.8... I'm doing the "ground up" and trying
to get registry scripts working first and I've run into the following,
right-off-the-bat head scratchers:
(1) The documentation says that:
href="http://perl.apache.org/docs/2.0/user/config/config.htm l#toc_C_ParseHeaders_">ParseHeaders
Scan output for HTTP headers, same functionality as mod_perl 1.0's
PerlSendHeader
, but more robust. This option is usually
needs to
be enabled for registry scripts which send the HTTP header with:
print "Content-type: text/html\n\n";
Doesn't work for me... When I run registry scripts using in httpd.conf:
Alias /mp "/var/www/mp"
PerlModule ModPerl::Registry
<Directory "/var/www/mp">
SetHandler perl-script
Options +ExecCGI
PerlHandler ModPerl::Registry
PerlOptions ParseHeaders
Order allow,deny
Allow from all
</Directory>
The content-type is never sent and the response delivers text/plain --
I see the HTML in plain text. When I go back to the MP 1.0 way in
httpd.conf, it works:
Alias /mp "/var/www/mp"
PerlModule ModPerl::Registry
<Directory "/var/www/mp">
SetHandler perl-script
Options +ExecCGI
PerlHandler ModPerl::Registry
PerlSendHeader On
Order allow,deny
Allow from all
</Directory>
What's the story here....?
ALSO...
(2) It took me a while to figure out that Apache::Registry has become
ModPerl::Registry. I saw nothing and still see nothing in the MP 2.0
docs about this, what I would consider MAJOR change, and as I said, it
took me a while to realize what happened here... What gives? What was
wrong with Apache::Registry???
I had Stas' book, which I know was written during MP 1.0, so between
these two things, it leaves me wondering how much more of the book is
now practically worthless?? I'm fast beginning to feel MP 2.0 has now
become the domain of "old MP 1.0 hands" and if you didn't follow MP
from 1.0 days -- which I did not in a consistent way, then you are out
of luck... Where can I get the latest MP 2.0 beef? I think the MP 2.0
documentation at perl.apache.org leaves a lot to be desired...
Anyways, if someone can explain the ParseHeaders versus PerlSendHeader
and the ModPerl::Registry versus Apache::Registry changes, that would
help at least get registry scripts running in the optimal way. If the
MP 2.0 docs say that ParseHeaders is better, than I'd like to be able
to use it, but right now, it doesn't seem to work as the docs say. :-(
-PJ
--------------090004030902090109070803--
Re: [Newbie] MP2.0: PerlSendHeader versus PerlOptions (and Apache::Registry grrr...)
am 25.04.2008 06:43:43 von Perrin Harkins
On Fri, Apr 25, 2008 at 12:18 AM, Perl Junkie wrote:
> PerlOptions ParseHeaders
I think that should be +ParseHeaders. See
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_P erlSendHeader_
> (2) It took me a while to figure out that Apache::Registry has become
> ModPerl::Registry. I saw nothing and still see nothing in the MP 2.0 docs
> about this, what I would consider MAJOR change, and as I said, it took me a
> while to realize what happened here... What gives? What was wrong with
> Apache::Registry???
This is answered in the migration guide for converting from 1.x to 2.x:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_A pache__Registry___C_Apache__PerlRun__and_Friends
> I had Stas' book, which I know was written during MP 1.0, so between these
> two things, it leaves me wondering how much more of the book is now
> practically worthless??
The information about system architecture, performance tuning,
debugging techniques, and general perl issues is all applicable, but
of course the API for mod_perl 2 is different and there's no way
around that. There is a new book by Stas and Jim Brandt about
mod_perl 2:
http://modperl2book.org/
> I think the MP 2.0 documentation at
> perl.apache.org leaves a lot to be desired...
Sorry to hear you don't like the documentation. If you have some
ideas for how to improve it, send them over.
- Perrin
Re: [Newbie] MP2.0: PerlSendHeader versus PerlOptions (and Apache::Registrygrrr...)
am 25.04.2008 07:00:01 von Perl Junkie
This is a multi-part message in MIME format.
--------------040802090805020308030005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Perrin Harkins wrote:
> On Fri, Apr 25, 2008 at 12:18 AM, Perl Junkie wrote:
>
>> PerlOptions ParseHeaders
>>
>
> I think that should be +ParseHeaders. See
> http://perl.apache.org/docs/2.0/user/porting/compat.html#C_P erlSendHeader_
>
I did finally see that in another section. I *have* to bother thousands
of people with a question before I find it in the docs, even if I've
already looked. I have no idea why it works out that way. :-( :-)
>
>> (2) It took me a while to figure out that Apache::Registry has become
>> ModPerl::Registry. I saw nothing and still see nothing in the MP 2.0 docs
>> about this, what I would consider MAJOR change, and as I said, it took me a
>> while to realize what happened here... What gives? What was wrong with
>> Apache::Registry???
>>
>
> This is answered in the migration guide for converting from 1.x to 2.x:
> http://perl.apache.org/docs/2.0/user/porting/compat.html#C_A pache__Registry___C_Apache__PerlRun__and_Friends
>
Nice.
>
>> I had Stas' book, which I know was written during MP 1.0, so between these
>> two things, it leaves me wondering how much more of the book is now
>> practically worthless??
>>
>
> The information about system architecture, performance tuning,
> debugging techniques, and general perl issues is all applicable, but
> of course the API for mod_perl 2 is different and there's no way
> around that. There is a new book by Stas and Jim Brandt about
> mod_perl 2:
> http://modperl2book.org/
>
I'll look into it. Thanks. Sounds invaluable.
>
>> I think the MP 2.0 documentation at
>> perl.apache.org leaves a lot to be desired...
>>
>
> Sorry to hear you don't like the documentation. If you have some
> ideas for how to improve it, send them over.
>
Hmmmm, seems like maybe my ability to spot the right information IN the
docs is what is leaving a lot to be desired right now. :-) Maybe I need
to just settle down and read some more first before assuming it's "not
there." Thanks!
The only suggestion so far would be to make that one section I quoted on
the ParseHeaders option a little more clearer than it is albeit it's
documented elsewhere, as you pointed out above.
What nice people here at MP... :-) Alright, I'll leave y'all alone and
do some more reading first. The migration guide seems like a good place
to start to convert all my past (way, way back in the past) remembrances
into the new MP2 reality.
-PJ
--------------040802090805020308030005
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Perrin Harkins wrote:
cite="mid:66887a3d0804242143g2347c8faj9259de455625508f@mail. gmail.com"
type="cite">
On Fri, Apr 25, 2008 at 12:18 AM, Perl Junkie wrote:
PerlOptions ParseHeaders
I think that should be +ParseHeaders. See
I did finally see that in another section. I *have* to bother
thousands of people with a question before I find it in the docs, even
if I've already looked. I have no idea why it works out that way. :-(
:-)
cite="mid:66887a3d0804242143g2347c8faj9259de455625508f@mail. gmail.com"
type="cite">
(2) It took me a while to figure out that Apache::Registry has become
ModPerl::Registry. I saw nothing and still see nothing in the MP 2.0 docs
about this, what I would consider MAJOR change, and as I said, it took me a
while to realize what happened here... What gives? What was wrong with
Apache::Registry???
This is answered in the migration guide for converting from 1.x to 2.x:
Nice.
cite="mid:66887a3d0804242143g2347c8faj9259de455625508f@mail. gmail.com"
type="cite">
I had Stas' book, which I know was written during MP 1.0, so between these
two things, it leaves me wondering how much more of the book is now
practically worthless??
The information about system architecture, performance tuning,
debugging techniques, and general perl issues is all applicable, but
of course the API for mod_perl 2 is different and there's no way
around that. There is a new book by Stas and Jim Brandt about
mod_perl 2:
I'll look into it. Thanks. Sounds invaluable.
cite="mid:66887a3d0804242143g2347c8faj9259de455625508f@mail. gmail.com"
type="cite">
I think the MP 2.0 documentation at
perl.apache.org leaves a lot to be desired...
Sorry to hear you don't like the documentation. If you have some
ideas for how to improve it, send them over.
Hmmmm, seems like maybe my ability to spot the right information IN the
docs is what is leaving a lot to be desired right now. :-) Maybe I
need to just settle down and read some more first before assuming it's
"not there." Thanks!
The only suggestion so far would be to make that one section I quoted
on the ParseHeaders option a little more clearer than it is albeit it's
documented elsewhere, as you pointed out above.
What nice people here at MP... :-) Alright, I'll leave y'all alone and
do some more reading first. The migration guide seems like a good
place to start to convert all my past (way, way back in the past)
remembrances into the new MP2 reality.
-PJ
--------------040802090805020308030005--