We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Creat multi modules with Devtools 3.01 error

When i try to use Devtools for phalcon 3.01 to creat multi modules skeleton, I get this error :

Warning: Phalcon\Mvc\View\Engine\Volt\Compiler::compileFile(C:\xampp\htdocs\idoc/cache/volt/C:\xampp\htdocs\idoc\app\modules\frontend%%views%%index%%index.volt.php): failed to open stream: Invalid argument in C:\xampp\htdocs\idoc\app\bootstrap_web.php on line 56
Volt directory can't be written
#0 [internal function]: Phalcon\Mvc\View\Engine\Volt\Compiler->compileFile('C:\\xampp\\htdocs...', 'C:\\xampp\\htdocs...', false)
#1 [internal function]: Phalcon\Mvc\View\Engine\Volt\Compiler->compile('C:\\xampp\\htdocs...')
#2 [internal function]: Phalcon\Mvc\View\Engine\Volt->render('C:\\xampp\\htdocs...', NULL, true)
#3 [internal function]: Phalcon\Mvc\View->_engineRender(Array, 'index/index', true, true, NULL)
#4 [internal function]: Phalcon\Mvc\View->render('index', 'index', Array)
#5 C:\xampp\htdocs\idoc\app\bootstrap_web.php(56): Phalcon\Mvc\Application->handle()
#6 C:\xampp\htdocs\idoc\public\index.php(2): require('C:\\xampp\\htdocs...')
#7 {main}

Anybody can help me how to fix this please ?



85.5k

no idea but it seems like permission problem



6.6k

hmm, it's on window , permission seem not right

@esoftcard Coul you please try the 3.0.x branch?

$ git clone [email protected]:phalcon/phalcon-devtools.git
$ cd phalcon-devtools
$ git checkout 3.0.x
$ php phalcon.php


6.6k

I have downloaed phalcon devtool as your link, but it still error right after i generate a project with this command :

phalcon project projectname --type=modules

can you try and see what happen please

@esoftcard Coul you please try the 3.0.x branch?

$ git clone [email protected]:phalcon/phalcon-devtools.git
$ cd phalcon-devtools
$ git checkout 3.0.x
$ php phalcon.php

Can't reproduce, Sorry



6.6k

so pitty, why phalcon build devtools with error like that :(



43.9k
edited Oct '16

Hi,

in your first message, you've got a permission error:

Volt directory can't be written

Volt files are compiled into regular php files and output is written in the cache directory.

I do not use Windows, but you have to give write permission on the whole C:\xampp\htdocs\idoc\cache directory to the user who run your webserver (www-data for apache on a linux box)



6.6k

I sure that i have set allow permission for hold folder but it's still error . Anybody's worked with devtools : phalcon project projectname --type=modules yet ? Please help



43.9k
edited Oct '16

Hi,

on my linux box:

phalcon project modulesTest --type=modules

cd modulesTest

chown -R www-data cache

It's working for me ! I've got no errors like "Volt directory can't be written"



6.6k

it works on linux but window and xampp