Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

PHP Fatal error: Uncaught Smarty: unable to write file cache

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
ciro
Smarty n00b


Joined: 11 Aug 2017
Posts: 3

PostPosted: Fri Aug 11, 2017 3:51 pm    Post subject: PHP Fatal error: Uncaught Smarty: unable to write file cache Reply with quote

Hello guys! Smile

I'm with a curious bug/error, saw at apache Log.

A lot of errors like this:

Arrow PHP Fatal error: Uncaught Smarty: unable to write file /var/www/html/cache/bla/bla/mobile/webp/93/1a/56/wrt598dce5db4f386_43602584 <-- thrown in /var/www/html/libs/smarty/sysplugins/smarty_internal_runtime_writefile.php on line 49

But this folder ("cache") already have 777 permissions. The folder "templates_c" already too.

Anyone knows how to solve this?

I'm using the latest version of Smarty: 3.1.31

Anyway, Best Regards!
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1105

PostPosted: Fri Aug 11, 2017 4:42 pm    Post subject: Reply with quote

Look for previous errors. And check your permissions. "777" is never a solution to permission issues.
Back to top
View user's profile Send private message
ciro
Smarty n00b


Joined: 11 Aug 2017
Posts: 3

PostPosted: Fri Aug 11, 2017 6:21 pm    Post subject: Reply with quote

AnrDaemon wrote:
Look for previous errors. And check your permissions. "777" is never a solution to permission issues.


I appreciate your response.

But I've tested in many environments:

- Folders with 777
- Folders with Apache user/group owner (www:data)
- Folders with 755

Every situation, continues the error. And every test, I cleaned up the folder before and restart the services as well.

I'm using PHP 7.1.8 and Smarty 3.1.31.

Is it possible to be a Smarty bug in handling caches with subdirectories?
Back to top
View user's profile Send private message
ciro
Smarty n00b


Joined: 11 Aug 2017
Posts: 3

PostPosted: Thu Aug 24, 2017 1:42 pm    Post subject: Partially solved Reply with quote

The problem was partially solved, when I disable the compile_locking on config.

This cause more errors in sites with millions of pageviews and cache variations.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1105

PostPosted: Sat Aug 26, 2017 12:57 pm    Post subject: Reply with quote

If your site is such a busy, look into other, more performant caching mechanics.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP