403 Access Forbidden On /framework - Windows

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] 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:

<Directory "C:/xampp/htdocs">

Options Indexes FollowSymLinks Includes ExecCGI

AllowOverride All

### Order allow,deny -- note that this change made no difference

Order deny,allow

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] configuration error: couldn’t perform authentication. AuthType not set!: /mytestapp/index.php

So I put it back the way it was:

Order deny,allow

Allow from all

and now it works. (I know to bounce Apache after each change, btw.)

Oh well.

Controller Generator

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"…

generating controllers/SampleController.php

       Unable to write the file '/Applications/XAMPP/xamppfiles/htdocs/myMithran/protected/controllers/SampleController.php'.

generating views/sample/index.php

       Unable to create the directory '/Applications/XAMPP/xamppfiles/htdocs/myMithran/protected/views/sample'.