#1 The normal procedure is that you first install Yii on your local development machine which you should have full control of; you develop your web app on your development machine; and finally you upload your work to the public server.
#2 yiic.php is not meant to be accessed via browser. It is a command line script. You should open a console window on your local development machine and call the needed yiic commands.
I don't want to rag on you too, but I understood the instructions and the local part / webserver part. I'm getting slowed down futher into the instructions, because I've never had formal training in PHP at all much less MVC. I'm a Java programmer who was well, taught bad form. And so I'm trying to get grips on all this and it's slow going for me, but don't give up! This looks like one of the most rewarding frameworks to learn out there.
AND MY Props to the instruction guys, more vids is ALWAYS welcome!!!
So I tried that. I ran the command line tool to get the skeleton (why I have to run a tool is beyond me), but never the less, I deleted all the files within the skeleton except the config/main.php and the index.php, but now the application yells at me (error here, error there).
Where can I find a list of “required” files in the skeleton but forgoing the actual “web app” that is created. I don’t need the web app at all. Does that make sense?
Because I am bored (I have some programming I need to do and thus need an excuse not doing it) I will walk you through the process.
First, create a skeleton
yiic webapp testingapp
First, go into protected/views/site and remove the ‘pages’ subdirectory.
Second, go into protected/models and delete ‘ContactForm.php’.
If you don’t need any testing, you can delete index-test.php, protected/config/test.php and the directory protected/tests.
Leave the rest be.
Now, edit protected/controllers/SiteController.php, so that it looks like this:
class SiteController extends Controller
* This is the default 'index' action that is invoked
* when an action is not explicitly requested by users.
public function actionIndex()
// renders the view file 'protected/views/site/index.php'
// using the default layout 'protected/views/layouts/main.php'
* This is the action to handle external exceptions.
public function actionError()
* Displays the login page
public function actionLogin()
// if it is ajax validation request
if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')
// collect user input data
// validate user input and redirect to the previous page if valid
if($model->validate() && $model->login())
// display the login form
* Logs out the current user and redirect to homepage.
public function actionLogout()
You removed the contact error and the page-related actions.
Thank you for your reply. It’s exactly what I was looking for. And the reason I made another account is that there is a limitation of 3 posts on the first day your account was created. It also makes you wait 10 minutes after making an account before allowing you to post AND you can’t post links. Not sure if all of that is intended, but it sure as heck makes it hard for new members to ask questions they can’t seem to find the answer for. Anyhoo…