dwoo-project / dwoo

[UNMAINTAINED] php template engine
http://dwoo.org
GNU Lesser General Public License v3.0
167 stars 58 forks source link

Fatal error: Uncaught Dwoo\Exception: The compile directory must be writable, chmod #61

Closed ghost closed 7 years ago

ghost commented 7 years ago

I have "dwoo/dwoo": "1.3.*" loaded in PHP Composer.

Unfortunately, I'm getting the following error:

Fatal error: Uncaught Dwoo\Exception: The compile directory must be writable, chmod "/mnt/repos/_eamorr/eamorr/react_www/lib/composer/vendor/dwoo/dwoo/lib/compiled/" to make it writable in /mnt/repos/_eamorr/eamorr/react_www/lib/composer/vendor/dwoo/dwoo/lib/Dwoo/Core.php:813

I tried downgrading to 1.3.2 - same error

emulienfou commented 7 years ago

Hi! It seems that your /mnt/repos/_eamorr/eamorr/react_www/lib/composer/vendor/dwoo/dwoo/lib/compiled/ is not writable, did you try to do a chmod 777 to this directory ?

On line 813, the code is checking if your directory is writable or not!

ghost commented 7 years ago

It's a problem setting 777 to a folder in /lib/composer/vendor/... in my continuous integration environment.

So I set a 777 folder in my home directory ~/dwoo/compiled and point dwoo in there.

emulienfou commented 7 years ago

I presume you did something like that:

$dwoo = new Dwoo\Core();
$dwoo->setCompileDir('~/dwoo/compiled');

and you set writes to your user (e.g. www-data) to be able to write to ~/dwoo/compiled ?

If so, this is weird because setting the good write always fix the problem !!!