I’m a beginner in Yii and Linux. But I want to see another world (i usually use windows for everything).
I’ve been success installing the framework so far. The web pages appear well. Then i continue to develop it. I start with generating Models with Gii using my web browser. I insert the table name, and preview it, all is works. But when i generate it, error message appear:
There was some error when generating the code. Please check the following messages.
Generating code using template "/opt/lampp/htdocs/yii/framework/gii/generators/model/templates/default"...
generating models/Comment.php
Unable to write the file '/opt/lampp/htdocs/projectcenter/protected/models/Comment.php'.
done!
The problem that you don’t(Actually apache can’t) have permission to create files. You need to set permissions for it, or change apache user. Search some posts or articles about permissions on linux, it’ll help you to work with linux.