Thanks Tom.
I made a simple case for this issue but as a result of the test, it still doesn't work. So I think it may something to do Mod_perl and IO::File. I am running: Apache/2.0.46 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0 PHP/4.3.2 mod_ssl/2.0.46 OpenSSL/0.9.7b Server at mydomain Port 8080
#file:MyApache/template_test.pm
#----------------------
package MyApache::template_test;
use strict;
use warnings;
use IO::File;
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile => qw(OK);
use Apache::RequestUtil ();
sub handler {
my $r = shift;
$r->content_type('text/plain');
my $template_file = new
IO::File($r->document_root()."templates/quickquote.templ");
add a print call to see what path do you get. I suppose your DocumentRoot doesn't contain a trailing /. Instead use:
my $file = $r->server_root_relative("templates/quickquote.templ"));
or a more portable:
use File::Spec::Functions qw(catfile); my $file = $r->server_root_relative(catfile "templates", "quickquote.templ"));
You need to learn to use error_log, which I'd guess was telling you what was the error since the very beginning :)
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html