On Fri, May 17, 2002 at 10:06:37PM +0200, Gerald Richter wrote:
> > Question - does
> >
> > Execute('../init.epl')
> >
> > search EMBPERL_OBJECT_ADDPATH directories in addition to direct parent
> > directories?
>
> Yes
Okay good, but this is not working for me. See below.
> > I think it should, but it's not finding my parent init.epl in
> > an ADDPATH directory. It finds the parent fine if I move the child
> > init.epl out of the way.
> >
>
> The ../ will cause Embperl only to remove the first entry from the PATH and
> not to really search the parent directory (also under EmbperlObject, this is
> most time the same). To get what you want write
>
> Execute('./../init.epl')
>
> this will really look in the parent directory
Sorry, confusing use of terms. By 'parent' I wasn't meaning a filesystem
parent directory.
I've got an application configured like this:
<Directory "/export/opt/web/cts/htdocs">
Options +ExecCGI
SetHandler perl-script
PerlHandler HTML::EmbperlObject
PerlSetEnv EMBPERL_OBJECT_STOPDIR "/export/opt/web/cts/htdocs"
PerlSetEnv EMBPERL_OBJECT_ADDPATH "/export/opt/web/base"
</Directory>
There's a 'header.epl' component in both /export/opt/web/cts/htdocs and
/export/opt/web/base. The /export/opt/web/cts/htdocs header.epl looks
like this:
[- $req = shift; -]
<pre>
stopdir: [+ $ENV{EMBPERL_OBJECT_STOPDIR} +]
addpath: [+ $ENV{EMBPERL_OBJECT_ADDPATH} +]
path: [+ $req->Path +]
</pre>
[- Execute '../header.epl'; -]
This fails with an internal server error:
[19393]ERR: 12: header.epl(1): File ../header.epl open error: No such file or
directory
If I change the '../header.epl' above to '/export/opt/web/base/header.epl'
everything works fine, and the header content is:
stopdir: /export/opt/web/cts/htdocs
addpath: /export/opt/web/base
path: ;/export/opt/web/cts/htdocs;/export/opt/web/base
I turned debugging up to 66609149 and the relevant embperl.log portion
seems to be:
[19395]Embperl path search Path:
/export/opt/web/cts/htdocs;/export/opt/web/base Fi
lename: header.epl
[19395]Embperl path search pathskip = 0 pathndx = 1
[19395]Embperl path search Check: /export/opt/web/cts/htdocs/header.epl
[19395]MEM: Reload /export/opt/web/cts/htdocs/header.epl in
HTML::Embperl::DOC::_7
[19395]CACHE: Found File for '/export/opt/web/cts/htdocs/header.epl'
(8d194c0) in '
HTML::Embperl::DOC::_7' hash cache-key
'/export/opt/web/cts/htdocs/header.epl'
[19395]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[19395]REQ: Package = HTML::Embperl::DOC::_7
[19395]Using APACHE for output...
[19395]Reading /export/opt/web/cts/htdocs/header.epl as input using
PerlIO ...
[19395]SRC: Line 1: Time 0 ms [- $req = shift; -]
[19395]DEF: Line 1: $req = shift;
[19395]EVAL< $req = shift;
[19395]EVAL> HTML::Embperl::DOC::_10=HASH(0x8d3eee4)
[19395]SRC: Line 2: Time 0 ms <pre>
[19395]CMD-: Cmd = 'pre'
[19395]SRC: Line 2: Time 0 ms [+ $ENV{EMBPERL_OBJECT_STOPDIR} +]
[19395]DEF: Line 3: $ENV{EMBPERL_OBJECT_STOPDIR}
[19395]EVAL< $ENV{EMBPERL_OBJECT_STOPDIR}
[19395]EVAL> /export/opt/web/cts/htdocs
[19395]SRC: Line 3: Time 0 ms [+ $ENV{EMBPERL_OBJECT_ADDPATH} +]
[19395]DEF: Line 4: $ENV{EMBPERL_OBJECT_ADDPATH}
[19395]EVAL< $ENV{EMBPERL_OBJECT_ADDPATH}
[19395]EVAL> /export/opt/web/base
[19395]SRC: Line 4: Time 0 ms [+ $req->Path +]
[19395]DEF: Line 5: $req->Path
[19395]EVAL< $req->Path
[19395]EVAL> ;/export/opt/web/cts/htdocs;/export/opt/web/base
[19395]SRC: Line 5: Time 0 ms </pre>
[19395]CMD-: Cmd = '/pre'
[19395]SRC: Line 6: Time 0 ms [- Execute '../header.epl'; -]
[19395]DEF: Line 7: Execute '../header.epl';
[19395]EVAL< Execute '../header.epl';
[19395]Embperl path search Path: Filename: header.epl
[19395]Embperl path search pathskip = 1 pathndx = 1
[19395]MEM: Reload ../header.epl in HTML::Embperl::DOC::_8
[19395]CACHE: Found File for '../header.epl' (8d306d0) in
'HTML::Embperl::DOC::_8'
hash cache-key '../header.epl/export/opt/web/cts/htdocs'
[19395]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[19395]REQ: Package = HTML::Embperl::DOC::_8
[19395]Reading ../header.epl as input using PerlIO ...
[19395]ERR: 12: header.epl(1): File ../header.epl open error: No such
file or directory
[19395]EVAL> 500
[19395]PERF: input = /export/opt/web/cts/htdocs/header.epl
[19395]PERF: Time: 0 ms Evals: 5 Cache Hits: 0 (0%)
[19395]Sub-Request finished. Mon May 20 08:04:13 2002
. Entry-SVs: 90417 -OBJs: 74 Exit-SVs: 90442 -OBJs: 74
The log seems to indicate it finds the base/header.epl but then fails to
open it? It's not permissions, because it finds the base/header.epl fine
if the name is fully qualified, or if the cts/htdocs/header.epl is
renamed out of the way.
Any clues?
Cheers,
Gavin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]