|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
WMV Smarty Rookie
Joined: 26 Dec 2009 Posts: 7
|
Posted: Mon Jun 21, 2010 10:28 am Post subject: errors triggered with $smarty->clearAll($exp_time); |
|
|
I get alot of warnings in my log when using $smarty->clearAll($exp_time).
rmdir(.....) [<a href='function.rmdir'>function.rmdir</a>]: Directory not empty. in /sysplugins/smarty_internal_cacheresource_file.php` on line:`155`
Is there a better way for doing this without triggering all these errormessages?
And an other problem i have is that the connection to the browser gets resetted by server, cause of a lot of cache-files to be deleted. |
|
Back to top |
|
emt Smarty Regular
Joined: 10 Dec 2009 Posts: 43
|
Posted: Mon Jun 21, 2010 3:08 pm Post subject: |
|
|
Code: | set_time_limit($seconds); |
Just ensure $seconds is a number higher than the number of seconds it takes to clear the cache. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Jun 21, 2010 8:37 pm Post subject: |
|
|
Smarty does use @rmdir() where the @ normally disables error messages in case the directory is not empty. Did you implement a custom error handler which still does get this warnings? |
|
Back to top |
|
WMV Smarty Rookie
Joined: 26 Dec 2009 Posts: 7
|
Posted: Mon Jun 21, 2010 8:57 pm Post subject: |
|
|
Yes our system has its own error and exceptionhandlers but the error is only logged not shown on site. but without the handlers is still logged in errorlog of apache but surpressed in site. isnt there an other way to detect is dir is empty before trying to remove the dir? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|