frocco
(Farocco)
February 27, 2010, 2:05am
1
Hi All,
I am coming from a codeigniter background and was looking at kohana, when I stumbled onto yii.
I recently switched to Mac and am having configuration problems running yii
I want to learn yii by using the blog tutorial.
while in the shell, I ran the model * with no problems.
however when I run the crud Post
the shell terminates.
What is the best way to run yii on Mac?
Do I develop apps inside the yii folder?
I would like to make this easier.
Thanks
Frank
tri
(tri - Tommy Riboe)
February 27, 2010, 6:13pm
3
frocco:
bump…
Still not working.
>>crud Post
Shell exits.
Check server log and/or php log for errors?
/Tommy
frocco
(Farocco)
February 27, 2010, 7:56pm
4
here is the php error log:
[27-Feb-2010 19:54:22] PHP Warning: include(): Failed opening ‘/Users/farocco/Sites/blog/protected/models/Post.php’ for inclusion (include_path=’.:/Users/farocco/Sites/blog/protected/components:/Users/farocco/Sites/blog/protected/models:/Applications/MAMP/bin/php5/lib/php’) in /Users/farocco/Sites/yii/framework/YiiBase.php on line 335
[27-Feb-2010 19:54:22] PHP Fatal error: Class ‘Post’ not found in /Users/farocco/Sites/yii/framework/db/ar/CActiveRecord.php on line 326
This generated after I did the crud Post
Do I have a bad install?
Thanks
frocco
(Farocco)
February 27, 2010, 8:05pm
5
I just realized that the table Post is TblPost and I was following the tutorial for the blog.
So crud TblPost works
Sorry for the wasted time.
Frank
qiang
(Qiang Xue)
February 27, 2010, 9:29pm
6
If you are following the blog tutorial, you should set ‘tablePrefix’ in main.php so that the generated model classes do not include the Tbl prefix.
frocco
(Farocco)
February 27, 2010, 10:19pm
7
Ok, thanks qiang.
Hope all is well, I remember you back in my Prado days.
I want to get up to speed as quickly as possible for an upcoming project.
I am comparing how I did things in codeigniter and what I need to do in yii.
Great framework, your one smart guy.
Regards,
Frank
frocco
(Farocco)
February 27, 2010, 10:23pm
8
I just checked main.php and do not see a tablePrefix
do I just enter tablePrefix=‘tbl’
Thanks