Yii Framework Forum: Problems With The Testdrive Example - Yii Framework Forum

Jump to content

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

Problems With The Testdrive Example Rate Topic: -----

#1 User is offline   volledoen 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-February 13

Posted 08 February 2013 - 06:32 AM

Hi,

I'm trying to create my first Yii application, step by step, with the testdrive example but i meet some problems.

Problem n° 1 :
The application works good but when i'm trying to go "localhost:800/testdrive/index.php?r=user", this doesn't work.
When i try with this url "localhost:800/testdrive/index.php/user", i can see the user page !

Problem n° 2 :
When i'm try to create a new user, i obtain an error CException : UserController cannot find the requested view "_form".

Problem n° 3 :
When i add a row in my user table directy in the database and i test "localhost:800/testdrive/index.php/user", i obtain a PHP warning : require(): Filename cannot be empty
0

#2 User is offline   rootbear 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 222
  • Joined: 17-June 11

Posted 08 February 2013 - 06:37 PM

you may want to use
yiic create webapp testdrive
to create a new site instead of copy & paste from article, you may have better chance to get a working example
I enjoy the Yii.sy coding life here.
0

#3 User is offline   volledoen 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-February 13

Posted 11 February 2013 - 03:13 AM

View Postrootbear, on 08 February 2013 - 06:37 PM, said:

you may want to use
yiic create webapp testdrive
to create a new site instead of copy & paste from article, you may have better chance to get a working example


I have tested these 2 ways and the example doesn't work in his integrality :

% php YiiRoot/framework/yiic.php webapp WebRoot/testdrive

==> //localhost/testdrive/index.php?r=user
Error 404
Unable to resolve the request "user".

% YiiRoot/framework/yiic webapp WebRoot/testdrive
==> //localhost/testdrive/index.php?r=user
Return to the index page

When i test your suggestion in adding "create", the command doesn't work :
% YiiRoot/framework/yiic create webapp WebRoot/testdrive

What is the proper method ?
0

#4 User is offline   rootbear 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 222
  • Joined: 17-June 11

Posted 15 February 2013 - 05:38 PM

sorry my bad, no 'create' in command.

your command to create webapp is right.

there is no user module by default, you have to add by yourself.

you may want to compare the webapp you created and yii demo blog to see what's the different.

keep reading your book...
I enjoy the Yii.sy coding life here.
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