Yii Framework Forum: Running A First Web App With Yii - Yii Framework Forum

Jump to content

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

Running A First Web App With Yii Rate Topic: ****- 1 Votes

#1 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 18 February 2014 - 04:07 PM

Good day

I have been trying to create my first web app for yii, but I am struggling to get the correct results.

I have altered my .htacces file from having code already but I keep getting the permission denied error my system.

I was wondering whether there might be a file that needs to be amended as well.

Your response will be highly appreciated.
0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 18 February 2014 - 04:11 PM

Plz show your htaccess.

before that check that index.php is located somewhere inside webroot and you're requesting correct path
God is real unless declared as integer
0

#3 User is offline   Matthew Torres 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 12-February 14

Posted 18 February 2014 - 09:25 PM

By any chance are you using WAMP? If so you should use this:
<ifModule mod_rewrite.c>
# Turn on the engine:
RewriteEngine on
# Don't perform redirects for files and directories that exist:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For everything else, redirect to index.php:
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
</ifModule>
0

#4 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 19 February 2014 - 06:55 AM

Hi guys

Thanks for replying I have already set my path as see attachment and it didn't work

I already tried running this script as well, see attachment in cmd and I got the access is denied error with this as well

here is my .htaccess file, but for some reason I cannot find the index.php file and I haven't altered the yii folder since downloading it, would you paste me the contents of it here in this discussion.

RewriteEngine on

# prevent httpd from serving dotfiles (.htaccess, .svn, .git, etc.)
RedirectMatch 403 /\..*$
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php

Your help highly appreciated.
0

#5 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 19 February 2014 - 07:01 AM

index.php should be right inside docroot folder (web? www? htdocs?) and it looks like this
// change the following paths if necessary
$yii = dirname(__FILE__) . '/../framework/yii.php';
$config = dirname(__FILE__) . '/protected/config/main.php';

// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG', true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);

require_once($yii);
Yii::createWebApplication($config)->run();


Notice that this file is shipped with Yii, you don't need to create one (of course, if you haven't deleted it by chance)
God is real unless declared as integer
0

#6 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 19 February 2014 - 08:33 AM

Hi ORey

I cpouldn't locate the file I'll just add it automatically then.

Thanks alot I'll let you know once I am successful.
0

#7 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 23 February 2014 - 03:54 AM

hi

there must be something I am missing within the framework that needs to be amended I am even running cmd as an administrator but I still get the same error any ideas guys.

Your help will be highly appreciated.
0

#8 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 23 February 2014 - 04:01 AM

What is the error?
God is real unless declared as integer
0

#9 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 23 February 2014 - 04:49 AM

Hi Orey

It says xampp is not recognised as an internal or external command,
operable program or batch file.

I simply can't do anything to remove it.

Thanks for the reply Orey.
0

#10 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 23 February 2014 - 05:11 AM

By the way the index.php that you referred to is created with every web application that is created I realized this when examining the demo files that come with the yii framework.
0

#11 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 23 February 2014 - 05:29 AM

yes, read the post above

Quote

Notice that this file is shipped with Yii, you don't need to create one (of course, if you haven't deleted it by chance)

God is real unless declared as integer
0

#12 User is offline   k_gizzy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-February 14
  • Location:Johannesbburg, South Africa

Posted 23 February 2014 - 05:37 AM

Yes I am emphasisng that the index.php file that you have shown above is automatically created with each web application that is created and it can't be found within the framework's settings either than within the web apps.

but have you ran into the same problem I'm in right now?

I can't do anything at the moment without creating my first webapp.

Any ideas?

Thanks in adavnce.
0

#13 User is offline   Lê Văn Chiến 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 23-November 11
  • Location:Viet Nam

Posted 23 February 2014 - 08:53 PM

Thank !
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