Problems With The Testdrive Example
Posted 08 February 2013 - 06:32 AM
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
Posted 11 February 2013 - 03:13 AM
yiic create webapp testdriveto 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
Unable to resolve the request "user".
% YiiRoot/framework/yiic webapp WebRoot/testdrive
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 ?
Posted 15 February 2013 - 05:38 PM
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...