Answer the question
In order to leave comments, you need to log in
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question