Yii Framework Forum: 403 Access Forbidden On /framework - Windows - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

403 Access Forbidden On /framework - Windows Rate Topic: -----

#1 User is offline   Cactus Dave 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 14-March 13

Posted 14 March 2013 - 11:24 AM

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?
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

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.
"Less noise - more signal"
0

#3 User is offline   Cactus Dave 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 14-March 13

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.
0

#4 User is offline   Cactus Dave 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 14-March 13

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.
0

#5 User is offline   vicky selva 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-November 13

Posted 03 December 2014 - 01:15 AM

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'.
done!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users