Re: [SMARTY] Cache Problem

From: Date: Thu, 29 Jan 2004 22:42:37 +0000
Subject: Re: [SMARTY] Cache Problem
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10895@lists.php.net to get a copy of this message
custom error-handlers are called even if reporting errors is suppressed with the @-operator. the value of error_reporting() is 0 in this case, however. i think an error-handler should check the $errno against error_reporting() to ignore these. On Thu, Jan 29, 2004 at 09:14:14PM +0100, Alex wrote: > Thanks for the feedback, the error has caused by the fact that I have > custom error handlers, there is a small problem with smarty on some > hosts when one switches to custom error handlers. In the main smarty > class, lines 1739 onwards > > function _read_file($filename, $start=null, $lines=null) > ~ { > ~ if (!($fd = @fopen($filename, 'r'))) { > ~ return false; > ~ } > ... > > will spawn an error (E_WARNING). However, this can be easily corrected > if one cheked for the existence of this file before attempting to read > it, hence > > function _read_file($filename, $start=null, $lines=null) > ~ { > if(!file_exists($filename)){ > return false; > } > > ~ if (!($fd = @fopen($filename, 'r'))) { > ~ return false; > ~ } > > After the above was implemented all the problems have dissapeared, as an > error has been spawned when I have called is_cached() in the first place. > > with best regards, > > Alex > > messju mohr wrote: > > >On Thu, Jan 29, 2004 at 12:46:14AM +0100, Alex wrote: > > > >>Funny, but it seems as though Smarty does not like me giving it Cache > >>Group IDs in form of integers. The id '1|1|index.htm' does not work > >>spawning an > >> > >>fopen(/pub/home/ess01098/hotel/cache/1/1/%%113/%%1135816523/index.htm): > >>failed to open stream: No such file or directory > >> > >>error, whereas 'article|1|index.htm' works fine -- any ideas? > > > > > >hmm, '1|1|index.htm' works fine for me. which version do you use? > > > >the line and file where the error occurs could also be interesting. > > > >greetings > >messju > > > > > >>regards, > >> > >>alex

« previous php.smarty.general (#10895) next »