Hello!
> > My mod_perl is compiled as DSO, and I steped on rake (use
> > HTML::Embperl in startup.pl), but after removing this string, I
> > got [* *] tags on response.
>
> The doc's tells us:
>
>      [* Perl code *]
>   (only version 1.2b2 or higher)
>
> So upgrade to 1.2b9 (it's just as stable as 1.1.1) and you won't see the
[*
> *] anymore
>

Sorry, it is my fault. But I will wait for production release, and I need to
learn this (1.1.1) version.

> > And references to logfile returns file not found!
>
> You need to set up EMBPERL_VIRTLOG and a <Location> for it:
>
> dbgLogLink = 8192
> Inserts a link at the top of each page which can be used to view the log
for
> the current HTML file. See also EMBPERL_VIRTLOG.
>
> Example:
>
>
>     SetEnv EMBPERL_DEBUG 10477
>     SetEnv EMBPERL_VIRTLOG /embperl/log
>
>
>     <Location /embperl/log>
>     SetHandler perl-script
>     PerlHandler HTML::Embperl
>     Options ExecCGI
>     </Location>
>
It was specified in httpd.conf
My httpd.conf was
---------------------------------------
AddType text/html .epl

<VirtualHost 195.209.67.50>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot /usr/local/httpdata/ww
    ServerName www.samara.ru
    ErrorLog /usr/local/httpdata/www.sa
    CustomLog /usr/local/httpdata/www.s

<FilesMatch ".*\.epl$">
    SetHandler perl-script
    PerlHandler HTML::Embperl
    Options ExecCGI
</FilesMatch>

PerlSetEnv EMBPERL_DEBUG 10477
PerlSetEnv EMBPERL_VIRTLOG embperl

<Location embperl>
    SetHandler perl-script
    PerlHandler HTML::Embperl
    Options ExecCGI
</Location>
</VirtualHost>
---------------------------------------
but links to logfile always returns NotFound...
May be it is chained with my other problem. My front-proxy transfers all
dynamic requests to mod_perl powered server.
FrontProxy has a mod_proxy_add_forward module and I see HTML_X_FORWARDED_FOR
header in environment of perl scripts on mod_perl server. httpd.conf
contains two strings:

---------------------------------------
..........
AddModule mod_perl.c
#AddModule mod_php3.c

PerlRequire /usr/local/apache/power/conf/startup.pl
PerlPostReadRequestHandler My::ProxyRemoteAddr
---------------------------------------
and startup.pl
---------------------------------------
use Apache::Registry();
use Apache::Status();
use Apache::DBI();
use DBD::Oracle();

$ENV{ORACLE_HOME}  = "/usr/local/oracle8";
$ENV{NLS_LANG}     = "AMERICAN_AMERICA.CL8MSWIN1251";
$ENV{ORA_NLS}      = "$ENV{ORACLE_HOME}/ocommon/nls/admin/data";

sub My::ProxyRemoteAddr ($)
{                                                                        
#    my $r = shift;                                                      
    return FORBIDDEN;                                                    
                                                                         
#    # we'll only look at the X-Forwarded-For header if the requests     
#    # comes from our proxy at localhost                                 
#    return 
OK unless ($r->connection->remote_ip eq "195.209.67.50");
#
#    if (my ($ip) = $r->header_in('X-Forwarded-For') =~ /([^,\s]+)$/)
#

#       $r->connection->remote_ip($ip);
#    }
#
#    return OK;
}
1;
---------------------------------------
This worked but now doesnt. I even comment all string and leave only return
FORBIDDEN, but ...
Yes, I know cause...
When I comment all Embperl related stuff in httpd.conf of mod_perl server all works 
fine, X_FORVARDED_FOR and return FORBIDDEN, with EmbPerl my handlers doesnt work.
Anyone can explain me Why ?

THanx in advance


Reply via email to