Yii Framework Forum: Help - yii configuration on mac - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help - yii configuration on mac Trying to learn yii through the blog tutorial Rate Topic: -----

#1 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 26 February 2010 - 09:05 PM

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
Regards,

Frank
0

#2 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 27 February 2010 - 10:45 AM

bump..
Still not working.

>>crud Post

Shell exits.
Regards,

Frank
0

#3 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 27 February 2010 - 01:13 PM

View Postfrocco, on 27 February 2010 - 10:45 AM, said:

bump..
Still not working.

>>crud Post

Shell exits.


Check server log and/or php log for errors?

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#4 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 27 February 2010 - 02:56 PM

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
Regards,

Frank
0

#5 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 27 February 2010 - 03:05 PM

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
Regards,

Frank
0

#6 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,900
  • Joined: 04-October 08
  • Location:DC, USA

Posted 27 February 2010 - 04:29 PM

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.
0

#7 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 27 February 2010 - 05:19 PM

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
Regards,

Frank
0

#8 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 27 February 2010 - 05:23 PM

I just checked main.php and do not see a tablePrefix

do I just enter tablePrefix='tbl'

Thanks
Regards,

Frank
0

#9 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 232
  • Joined: 17-February 10

Posted 28 February 2010 - 08:05 AM

I figured it out.

Thanks
Regards,

Frank
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users