Hi,

There is a clash between the FilesMatch and Location directives.
A simple example using .epo for EmbperlObject, .epl for plain Embperl
and .epr for resource files (files that are executed only:

# httpd.conf ------------------------------------------------------

AddType text/html .epl
AddType text/html .epo

PerlSetEnv EMBPERL_OPTIONS 262144
PerlSetEnv EMBPERL_OBJECT_BASE base.epr
PerlSetEnv EMBPERL_COOKIE_PATH /
PerlSetEnv EMBPERL_DEBUG 0

PerlModule HTML::Embperl

<Files *.epo>
          SetHandler perl-script
          PerlHandler HTML::EmbperlObject
          Options ExecCGI
</Files>

<Files *.epl>
          SetHandler perl-script
          PerlHandler HTML::Embperl
          Options ExecCGI
</Files>

<Files *.epr>
          order deny,allow
          deny from all
</Files>

# ------------------------------------------------------------------

Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136



Michael Stepanov wrote:

Hi there,

I've used Embperl for 2 years. So, now I've decided to
try Embperl::Object.

I've configured apache as noticed below but when I request
target script I see output of only that script, not base.epl:


perl.conf:

PerlSetEnv EMBPERL_LOG /tmp/embperl.log
PerlSetEnv EMBPERL_DEBUG 33825832

LoadModule embperl_module /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Embperl/Embperl.so


PerlModule Embperl PerlModule Embperl::Object

AddType text/html .epl
<FilesMatch ".*\.htm.?|.*\.epl$">
   SetHandler  perl-script
   PerlHandler Embperl
   Options     ExecCGI
</FilesMatch>


http.conf:

<VirtualHost *:80>

. . . <Location "/opt/my_app/html">
Embperl_AppName app
Embperl_Object_Base base.epl
Embperl_UriMatch "\.htm.?|\.epl$"
EMBPERL_MAIL_ERRORS_TO [EMAIL PROTECTED]
EMBPERL_MAIL_ERRORS_LIMIT 0
EMBPERL_OBJECT_FALLBACK error.html
SetHandler perl-script
PerlHandler Embperl::Object
Options ExecCGI
</Location>


   PerlInitHandler Apache::Reload
   PerlSetVar ReloadAll On
   PerlSetVar ReloadModules "VG::*"

PerlSetEnv EMBPERL_SESSION_CLASSES "File Semaphore"
PerlSetEnv EMBPERL_SESSION_ARGS "Directory=/opt/videoguide/share/session"


</VirtualHost>

base.epl:
   [-
        Execute ('header.epl');
        Execute ('content.epl');
        Execute ('footer.epl');
   -]

content.epl:
   [- Execute('*'); -]

main.epl:
   [- print OUT "Hello world!"; -]

Any suggestions?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to