> I've set up TT under apache/mod_perl and wrote handler just like in
> www.template-toolkit.org/tpc4/paper.html. Seems to me that handler works
> OK, but i can't see any images on my web page :(. Images catalogue is in
> INCLUDE_PATH. And if i trace this apache (truss -p) then it looks ok:
>
> 1. setitimer(0x0,0xbfbffa1c,0xbfbffa0c) = 0 (0x0)
> 2. gettimeofday(0x2865a020,0x0) = 0 (0x0)
> 3. stat("/hosts/my_page/imgs/m_kask_p.gif",0x845f0fc) = 0 (0x0)
> 4. open("/.htaccess",0,0666) ERR#2 'No such file or 5. dire
> ctory'
>
> It tries to open image on line 3 and i think succeeds, but no matter how
> i write these image src's in html i won't show any of them. I've tried
> src="imgs/m_kask_p.gif", src="m_kask_p.gif", src="/imgs/m_kask_p.gif",
> but nothing works. And same story about style file. It's in lib dir and
> server doesn't seem to find it.
This doesn't sound like anything to do with TT. I presume the "Images
catalogue" is a directory containing the gifs? If so, it shouldn't
be in the TT2 INCLUDE_PATH: TT2 doesn't include these files. It just
serves up pages that contain <img src=...> tags.
Anyhow, here is a checklist:
- look at the Apache error and log file.
- are the gif file permissions right for Apache to read (yes,
the stat() above succeeds, but that only means the directory
has sufficient permissions for Apache). Does apache ever call
open() on the gif file, and does that succeed?
- can you see the image if you just type the URL into your browser,
eg: http://yourhost/imgs/m_kask_p.gif? If not, check the apache
config for DocumentRoot, any special rewriting rules, access rules
etc.
Craig