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:
<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
</Directory>
What dumbness have I committed?
Page 1 of 1
403 Access Forbidden On /framework - Windows
#2
Posted 14 March 2013 - 11:32 AM
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.
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.
"Less noise - more signal"
#3
Posted 14 March 2013 - 11:51 AM
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.
But I still get a 403 on the new app, in localhost/mytestapp.
#4
Posted 14 March 2013 - 12:10 PM
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:
Order deny,allow
Allow from all
and now it works. (I know to bounce Apache after each change, btw.)
Oh well.
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:
Order deny,allow
Allow from all
and now it works. (I know to bounce Apache after each change, btw.)
Oh well.
Share this topic:
Page 1 of 1

Help












