SUCH SANMARTÍN, GERARD wrote:
Hello again.

I'm trying to put in <perl> sections my httpd.conf relevant parts. But i
have problems:

May I ask why do you use an old non-release version? Please either upgrade to 1.99_11 or use the latest cvs.


In httpd.conf simply putting
<perl >
</perl>
does not work. I get no errors in error.log and i get this message

That's because the server hasn't started yet, so all errors go to the console.


[error] failes to resolve handler 'Apache::PerlSection'
Syntax error on line 378 of C:/.../httpd.conf
Can't locate loadable object for module Apache::CmdParms in @INC (@INC
contains ...) at C:/...XSloader.pm line 16

See if upgrading helps.


I've looked for in google but i've found nothing. Anyway, if i put in my
conf.pl the perl directives it seems to be right.

Then my problem is the next.
I try to reproduce this

<Location ~ ".*/log$">
        SetHandler perl-script
        PerlResponseHandler Blogum::UserLog
        Allow from all
        PerlOptions +ParseHeaders
</Location>

As Location expects a string, not a regex, it's normal that this don't works

$Location{'.*/log$'} = {
        SetHandler => "perl-script",
        PerlResponseHandler => "Blogum::UserLog",
        PerlOptions => "+ParseHeaders",
        Allow => "from all",
        };

sine.*/log$ in not treated as a regex.

Putting $Location{".*/log$"} = {
causes an error (syntax error)

of course it does ;) since it sees $" and a missing ", you are trying to insert pcre regexes into perl.


Then i try

$LocationMatch{".*/log$"} = {
        SetHandler => "perl-script",
        PerlResponseHandler => "Blogum::UserLog",
        PerlOptions => "+ParseHeaders",
        Allow => "from all",
        };

the same syntax error

$LocationMatch{'.*/log$'} = {
        SetHandler => "perl-script",
        PerlResponseHandler => "Blogum::UserLog",
        PerlOptions => "+ParseHeaders",
        Allow => "from all",
        };
right,
and

my $criteria = qr#.*log$#;
$LocationMatch{$criteria} = {
        SetHandler => "perl-script",
        PerlResponseHandler => "Blogum::UserLog",
        PerlOptions => "+ParseHeaders",
        Allow => "from all",
        };

Both are right, since apache can start, but if i look for the .*/log link, i
simply do not found anything (when before the module was started).

What can i do?? Is there any place with more examples than perl.apache.org??

You probably need to do:


$LocationMatch{'.*log$'} = {

and let Apache do the parsing.

So the main question is, any place to get more doc about that? since i have
read almost nothing and i need to know better what i am doing.

Both the eagle and the cookbook have extensive sections on <Perl> sections. Please see: http://perl.apache.org/docs/offsite/books.html


Apache/2.0.47 (Win32)

BTW, starting from 2.0.48, you can have normal <Perl> sections and don't need to add an extra space as in <Perl >



__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to