A
A
agent11562016-08-29 22:05:28
Yii
agent1156, 2016-08-29 22:05:28

Gii in Yii2 doesn't work, what's wrong?

I go to Gii, click Preview, then the Generate button. A pink window pops up saying "There was something wrong when generating the code. Please check the following messages."
Below it is a black window
Generating code using template "/var/www/html/sitte/vendor/yiisoft/yii2-gii/generators/ module/default"...
generating modules/admin/Module.php
Unable to create the directory '/var/www/html/sitte/modules/admin'.
generating modules/admin/controllers/DefaultController.php
Unable to create the directory '/var/www/html/sitte/modules/admin/controllers'.
generating modules/admin/views/default/index.php
Unable to create the directory '/var/www/html/sitte/modules/admin/views/default'.
done!
What's the matter ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roma, 2018-02-04
@roma-dev

set the permissions on the folder
sudo chmod -R 1777 var/www/html/sitte
but this is not safe (sorry for bad advice)
I think you need to figure out what rights gii requires to run scripts

A
Alexey, 2016-09-06
@masterfreelance

Check directory permissions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question