Volt directory can't be written.

Hey,

The error I am getting is

html Warning: Phalcon\Mvc\View\Engine\Volt\Compiler::compileFile(../app/views/index/index.phtml.php): failed to open stream: Permission denied in /Users/mattstephens/Sites/magpie/public/index.php on line 26 Phalcon Exception: Volt directory can't be written

I have declared the volt engine usage in my bootstrap like so

```php $view->registerEngines(array( '.phtml' => 'Phalcon\Mvc\View\Engine\Volt' ));```

The mention of line 26 in my code points to the application handle function shown below

```php echo $application->handle()->getContent();```

Is this a permissions related thing or due to a missing directory?

I got the answer i need on stack overflow.

Basically if you don't specify where Volt can save it's compiled files it uses the directory the view file is located in.



30.9k

share link

Thanks for sharing the link and for giving me the right answer :)