perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Moran <p...@forloop.co.uk>
Subject EMBPERL_OBJECT_ADDPATH and httpd.conf
Date Fri, 27 Feb 2004 01:53:23 GMT
Hi all

OK I have a site which is for different countries and different
languages, what I wanted to do was have a EMBPERL_OBJECT_ADDPATH for
each directory (which represented a different country/lang) - for
example my httpd.conf

PerlSetEnv EMBPERL_OPTIONS 2048
PerlSetEnv EMBPERL_DEBUG 1167 
PerlSetEnv EMBPERL_SESSION_CLASSES "MySQL MySQL"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:XXXX:localhost
UserName=XXX Password=XX LockDataSource=dbi:mysql:XXX LockUserName=XXX
LockPassword=XXXX"
PerlSetEnv EMBPERL_SESSION_MODE 1
PerlSetEnv EMBPERL_COOKIE_NAME sid
PerlSetEnv EMBPERL_COOKIE_EXPIRES +3M
PerlModule Embperl; 
PerlSetEnv EMBPERL_ESCMODE 0
Embperl_UseEnv on
<Directory "/var/website/htdocs/ch/de">
	PerlSetEnv EMBPERL_OBJECT_ADDPATH
/var/website/htdocs/ch/de;/var/website/htdocs/shared/
        Embperl_AppName     unique-name
        Embperl_Object_Base base.epl
        Embperl_UriMatch    "\.html.?|\.epl$"
        SetHandler          perl-script
        PerlHandler         Embperl::Object 
        Options             ExecCGI
</Directory>
<Directory "/var/website/htdocs/ch/fr">
	PerlSetEnv EMBPERL_OBJECT_ADDPATH
/var/website/htdocs/ch/fr;/var/website/htdocs/shared/
       Embperl_AppName     unique-name
        Embperl_Object_Base base.epl
        Embperl_UriMatch    "\.html.?|\.epl$"
        SetHandler          perl-script
        PerlHandler         Embperl::Object 
        Options             ExecCGI
</Directory>

To illustrate the problem, I start apache in 1 child mode (httpd -X),
and go to /ch/de/.  This has the search path of
/var/website/htdocs/ch/de;/var/website/htdocs/shared/

Now if I go to the /ch/fr/ i still has the same search path, not the 
/var/website/htdocs/ch/fr;/var/website/htdocs/shared/

So if I have a 
[- Execute ('scripts/data.html') -]
it executes /var/website/htdocs/ch/de/scripts/data.html not 
/var/website/htdocs/ch/fr/scripts/data.html

So basically the path gets set to whatever directory the apache child
first visits...

Now I am assuming that what I am trying to achieve isn't achieveable in
this way - but what are the alternatives ?  I could modify the
EMBPERL_OBJECT_ADDPATH in each base.epl of each sub directory, but was
hoping there could be a more generic way of doing this ?


Any help greatfully received.



Cheers



Pete


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message