I’m sure this is something stupid. I am running xampp on windows 7, apache/mysql/php all running fine. Installed yii, copied all the files to c:\xampp\htdocs\yii.
I ran this:
C:\xampp\htdocs\yii\framework>yiic webapp mytestapp
Create a Web application under ‘C:\xampp\htdocs\yii\framework\mytestapp’? (yes|no) [no]:y
and it create the app for me, but localhost/yii/framework/mytestapp gives me a 403 error. So does localhost/yii/framework. (first post so I can’t include proper links, sorry)
I can browse the yii folders (except framework) and the demos (e.g. localhost/yii/demos/blog/) work fine.
Apache is running under the SYSTEM account, which has full control of all files under c:\, including framework directory.
Apache log says:
[Thu Mar 14 09:22:56 2013] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/htdocs/yii/framework
I’ve looked in the Apache config files and see nothing wrong (but I’m fairly new to Apache). I can’t figure out why /framework is special.
httpd.conf includes this:
Options Indexes FollowSymLinks Includes ExecCGI
### Order allow,deny -- note that this change made no difference
Allow from all
What dumbness have I committed?
It’s great that Yii prevents people from browsing the framework directories.
What you need to do is add C:\xampp\htdocs\yii\framework to your PATH.
Once you’ve done that, check that you can run yiic from anywhere.
Now, you need to go to C:\xampp\htdocs and run yiic webapp mytestapp
That should create a ‘mytestapp’ directory in C:\xampp\htdocs, which is what you want.
Thanks for the clue. I didn’t realize that yiic wanted to create the app in the current directory.
But I still get a 403 on the new app, in localhost/mytestapp.
It’s working now. But I don’t know why.
I edited httpd.conf a couple of times. I tried RequireLocal in the <Directory> entry, which Apache didn’t like:
[Thu Mar 14 11:04:32 2013] [crit] [client 127.0.0.1] configuration error: couldn’t perform authentication. AuthType not set!: /mytestapp/index.php
So I put it back the way it was:
Allow from all
and now it works. (I know to bounce Apache after each change, btw.)
There was some error when generating the code. Please check the following messages.
Generating code using template "/Applications/XAMPP/xamppfiles/htdocs/yii/framework/gii/generators/controller/templates/default"…
Unable to write the file '/Applications/XAMPP/xamppfiles/htdocs/myMithran/protected/controllers/SampleController.php'.
Unable to create the directory '/Applications/XAMPP/xamppfiles/htdocs/myMithran/protected/views/sample'.