Page 1 of 2

Error

Posted: 20 Oct 2018, 18:13
by Vrumurel
Fatal error: Uncaught exception 'RuntimeException' with message 'Failed to write cache file "./cache/production/twig/e5/e50c739822be82a2871b9dcc76f7a5ca5020a406eb9d14c5f0e3b0cb1e2eef9d.php".' in /home/erenro1/board.eren2.ro/vendor/twig/twig/lib/Twig/Cache/Filesystem.php:80 Stack trace: #0 /home/erenro1/board.eren2.ro/vendor/twig/twig/lib/Twig/Environment.php(457): Twig_Cache_Filesystem->write('./cache/product...', '<?php\n\n/* @dmzx...') #1 /home/erenro1/board.eren2.ro/phpbb/template/twig/environment.php(292): Twig_Environment->loadTemplate('@dmzx_mchat/mch...', NULL) #2 /home/erenro1/board.eren2.ro/vendor/twig/twig/lib/Twig/Template.php(366): phpbb\template\twig\environment->loadTemplate('@dmzx_mchat/mch...', NULL) #3 /home/erenro1/board.eren2.ro/cache/production/twig/b0/b04fe1b78eac081f71ade215999488f65f06851b55a0cb5846bde8975e8d06ef.php(75): Twig_Template->loadTemplate('@dmzx_mchat/mch...', '@dmzx_mchat/mch...', 17) #4 /home/erenro1/board.eren2.ro/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_47b0a841f1dd in /home/erenro1/board.eren2.ro/vendor/twig/twig/lib/Twig/Template.php on line 447

Any ideea what i get this?

Re: Error

Posted: 20 Oct 2018, 18:30
by kasimi
Hopefully your cache just has the hiccups. Delete the folder [board root]/cache/production and see if that helps.

Re: Error

Posted: 20 Oct 2018, 18:57
by Vrumurel
kasimi wrote:
20 Oct 2018, 18:30
Hopefully your cache just has the hiccups. Delete the folder [board root]/cache/production and see if that helps.
Did that every time, still appears

Re: Error

Posted: 20 Oct 2018, 19:04
by kasimi
Does your [board root]/cache folder have 777 permission?

Re: Error

Posted: 20 Oct 2018, 19:09
by Vrumurel
Yep

Re: Error

Posted: 20 Oct 2018, 19:11
by kasimi
Did you make changes to any files right before this error started to show up? What phpBB version and what mChat version are you using?

Re: Error

Posted: 20 Oct 2018, 19:16
by Vrumurel
kasimi wrote:
20 Oct 2018, 19:11
Did you make changes to any files right before this error started to show up? What phpBB version and what mChat version are you using?
phpbb 3.2.2 and mchat 2.1.1

Re: Error

Posted: 20 Oct 2018, 19:30
by kasimi
Ask your hosting provider why your cache folder isn't writable even though it's set to 777.

Re: Error

Posted: 20 Oct 2018, 19:39
by Vrumurel
kasimi wrote:
20 Oct 2018, 19:30
Ask your hosting provider why your cache folder isn't writable even though it's set to 777.
I will do that
But i tested smth, i disabled the mchat for an hour and didn t get any error

Re: Error

Posted: 20 Oct 2018, 19:47
by kasimi
mChat itself doesn't create any files related to Twig in the cache folder so it's core phpBB that's causing this. It could be happening with any extension.

Edit: this call to file_put_contents() returns false: https://github.com/twigphp/Twig/blob/v1 ... em.php#L65
This can happen if there's no more space left, for example.