I think I am getting crazy here.
 
I traced it down to Template::Provider::_fetch_path.
Some extra debug statements give this in the logs:
In apache (user apache):
[Template::Provider] fetching search.tt2
[Template::Provider] _fetch_path(search.tt2)
[Template::Provider] searching path: /home/marcl/catalyst/posedb/root/src/search.tt2
[Template::Provider] path not found: /home/marcl/catalyst/posedb/root/src/search.tt2
[Template::Provider] searching path: /home/marcl/catalyst/posedb/root/lib/search.tt2
[Template::Provider] path not found: /home/marcl/catalyst/posedb/root/lib/search.tt2
... (skipped)
 
In catalyst test server (user marcl, working in home directory):
[Template::Provider] fetching search.tt2
[Template::Provider] _fetch_path(search.tt2)
[Template::Provider] searching path: /home/marcl/catalyst/posedb/root/src/search.tt2
[Template::Provider] slot = ARRAY(0xa101c88)
[Template::Provider] _refresh([ ARRAY(0xa103d8c), /home/marcl/catalyst/posedb/root/src/search.tt2, Template::Document=HASH(0xa0f0eb0), 1160464516, <undef>, 1160641995])
[Template::Provider] fetching config/main
... (skipped)
 
 
The relevant code in Template::Provider::_fetch_path is:
            if ($caching && ($slot = $self->{ LOOKUP }->{ $path })) {
                # cached entry exists, so refresh slot and extract data
$self->debug("slot = $slot");
                ($data, $error) = $self->_refresh($slot);
                $data = "" DATA ]
                    unless $error;
                last INCLUDE;
            }
            elsif (-f $path) {
                $compiled = $self->_compiled_filename($path)
                    if $compext || $compdir;
$self->debug("compiled_filename = $compiled");
 
 
So, it seems that in case of the catalyst server, the cache is found. In case of apache, the cache slot is not found and the file path '/home/marcl/catalyst/posedb/root/src/search.tt2' is not found neither.
How the heck is that possible, the file is really there (it is paranoia, but I actually did a test -f on the command line and it returned true) !!
Can the _expression_ "-f $path" fail or succeed depending on the user (apache user versus marcl) ?
 
regards,
Marc 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Logghe
Sent: Wednesday, October 11, 2006 11:48 AM
To: catalyst@lists.rawmode.org
Subject: [Catalyst] problem deploying with apache: templates not found

Hi all,
I tried to deploy my little test application with apache, basically just like indicated here:
http://www.mail-archive.com/catalyst@lists.rawmode.org/msg01410.html
 
Apache starts without errors but when a request is send for http://localhost/pdfjoin, I get the catalyst error dump saying it can not find the template.
Running the very same application using the test server all works fine.
 
The paths for TTSite are configured as shown in the examples:
__PACKAGE__->config({
#    CATALYST_VAR => 'Catalyst',
    INCLUDE_PATH => [
        posedb->path_to( 'root', 'src' ),
        posedb->path_to( 'root', 'lib' )
    ],
    PRE_CHOMP  => 1,
....
 
Any clues ?
 
Thanks and regards,
Marc
 
 
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to