[Catalyst] problem deploying with apache: templates not found

Marc Logghe Marc.Logghe at DEVGEN.com
Thu Oct 12 10:56:27 CEST 2006


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 = $slot->[ 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: catalyst-bounces at lists.rawmode.org
[mailto:catalyst-bounces at lists.rawmode.org] On Behalf Of Marc Logghe
	Sent: Wednesday, October 11, 2006 11:48 AM
	To: catalyst at 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/[email protected]/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
	 
	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20061012/b9468d32/attachment.htm 


More information about the Catalyst mailing list