For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > October 2004 > Re: [SMARTY] bizzare problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] bizzare problem
Mark Rogers

2004-10-27, 8:57 am

PeteM writes:
> I keep getting this spurios error on a site
>
> Warning: _smarty_include(): Failed opening
> 'templates_c/%%177^%%1774593520^testing.inc.html.php' for inclusion
>

(include_path='.:/opt/php-4.3/lib/php:/usr/local/include:/www/vhtdocs/ukds/
>
> Happens ocassionally maybe 1 in 20 pages - hitting refresh clears the
> error ??


Which PHP version? Is the include_path listed correct (ie should the file be
there? Is it there?)

There was a bug in some older PHP versions which meant that PHP settings set
in one apache virtual host (eg the include path) carry across to other
vhosts. If the include_path is wrong, that's somewhere to look. Also I've
seen file access permissions change in strange ways under similar
circumstances, such that compiled templates are written but cannot later be
read or overwritten, so look for strange permissions or ownserships in the
templates_c directory.

I suspect that the path is correct, in which case Messju's comments may be
more appropriate.

For test purposes, try dumping the output from 'ls -la
/www/vhtdocs/ukds/templates_c' to your page immediately before you load the
problematic template, and see what's actually there before the include
fails.

--
Mark Rogers,
More Solutions Ltd
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com