Showing 1-7 of 7 items.

Relations: BELONGS_TO versus HAS_ONE

Created 15 years ago by Steve Friedl Steve Friedl, updated 13 years ago by Jorgee Jorgee. 9 comments

It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

56 0
35
Viewed: 172 965 times
Version: 1.1
Category: FAQs

"Why do I get a 403 error when trying to use Gii?"

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl Steve Friedl. 3 comments

After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error: ~~~ Error 403 You are not allowed to access this page. ~~~ This is almost certainly caused by the IP filtering mechanism that Gii uses to protect your system from outsiders - by default it allows localhost only (both IPv4 and IPv6), and r...

6 0
5
Viewed: 93 760 times
Version: 1.1
Category: FAQs