Unable to resolve the request "site".

hi,

I.m deployed Yii an hello world demo on my hosting server with folder struct:

/httpdocs/framework[color="#FF0000"]

/httpdocs/protected

/httpdocs/protected/controller/sitecontroller.php

/httpdocs/index.php[/color]

Red color: i’m copy from demo ‘hello world’ in Yii packed download

I’m checked hosting server is ok : hxxp://toam.pro/requirements/

but when going to: my page : hxxp://toam.pro => show error :

Page Not Found

Unable to resolve the request "site".

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

2011-11-05 08:52:19

=> check my log file have nothing error info

so how can i debug it error?

thanks for read my topic.

Teppy

[size=2]1)Kindly check the URL manager configuration in main.php file.[/size]

2)Please check a file permissions also.sometime it also create a problem.

please try this and share you feedback here.and if you get rid of from this problem by any other solution then share it here also.

[size=2]thanks for your reply[/size]

  1. Default URL manager is disabled in main.php file

  2. i’m try grant 777 to directory but error exits.

i’m try create new webapp, but it not run.

hxxp://toam.pro/

it show error:

CHttpException

Unable to resolve the request "site/error". (/var/www/vhosts/toam.pro/httpdocs/framework/web/CWebApplication.php:281)

#0 /var/www/vhosts/toam.pro/httpdocs/framework/base/CErrorHandler.php(280): CWebApplication->runController(‘site/error’)

#1 /var/www/vhosts/toam.pro/httpdocs/framework/base/CErrorHandler.php(181): CErrorHandler->render(‘error’, Array)

#2 /var/www/vhosts/toam.pro/httpdocs/framework/base/CErrorHandler.php(104): CErrorHandler->handleException(Object(CHttpException))

#3 /var/www/vhosts/toam.pro/httpdocs/framework/base/CApplication.php(709): CErrorHandler->handle(Object(CExceptionEvent))

#4 [internal function]: CApplication::handleException(Object(CHttpException))

#5 {main}

Application Log

Timestamp Level Category Message

09:23:27.092154 trace system.CModule

Loading "log" application component

in /var/www/vhosts/toam.pro/httpdocs/index.php (13)

09:23:27.095443 trace system.CModule

Loading "request" application component

in /var/www/vhosts/toam.pro/httpdocs/index.php (13)

09:23:27.098402 trace system.CModule

Loading "urlManager" application component

in /var/www/vhosts/toam.pro/httpdocs/index.php (13)

09:23:27.101763 trace system.CModule

Loading "coreMessages" application component

in /var/www/vhosts/toam.pro/httpdocs/index.php (13)

09:23:27.103816 error exception.CHttpException.404

exception ‘CHttpException’ with message 'Unable to resolve the request

“site”.’ in

/var/www/vhosts/toam.pro/httpdocs/framework/web/CWebApplication.php:281

Stack trace:

#0

/var/www/vhosts/toam.pro/httpdocs/framework/web/CWebApplication.php(136):

CWebApplication->runController(’’)

#1 /var/www/vhosts/toam.pro/httpdocs/framework/base/CApplication.php(158):

CWebApplication->processRequest()

#2 /var/www/vhosts/toam.pro/httpdocs/index.php(13): CApplication->run()

#3 {main} REQUEST_URI=/

09:23:27.104068 trace system.CModule

Loading "errorHandler" application component

I had the same problem, my controller name was UserManagementController, it worked just fine on windows, but when i moved it to linux, "Unable to resolve the request "usermanagement". " was shown,

The problem was that linux is casesensitive, I changed the controller name from UserManagementController to UsermanagementController and it worked!

[size=2]Hi,[/size]

may these steps work out for u…

In my case also i took files from SVN repository in to my windows , localhost dev environment and it gave me error URL not found Error404 , something like that.

Step1- Change config/main.php as follows


'urlManager' => array( 

    'urlFormat' => 'path',

    'showScriptName' => false,

    'rules' => array(              

                 	'/' => '/view',

                 	'//' => '/',

                 	'/' => '/',


            ),


        )

Step-2 Now modify ur application .htaccess file , which shoul be outside just protected folder some rewite-rules as follows…

[html]RewriteEngine on

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[/html]

Step 3- Restart your apache.and check in browser

Step4- Change http.config with Allow Override All , inplace of None.(For security point of view recheck this step).

Thanks shahdoost! This drove me nuts until I found your hint (used Mac OS and uploaded to Linux) and this actually solved the problem!

Worked for me too, thanks ::)

its small letter problem in linux/ubuntu servers. check for either controller classname letters or model classname letters.

please can someone help me out with errors, i dont understand what it meant

am new in this.

2016/12/16 12:18:19 [error] [php] Undefined offset: 0 (/var/www/html/yii/framework/base/CComponent.php(612) : eval()'d code:1)

Stack trace:

#0 /var/www/html/yii/framework/zii/widgets/grid/CGridColumn.php(231): CDataColumn->getDataCellContent()

#1 /var/www/html/yii/framework/zii/widgets/grid/CGridColumn.php(154): CDataColumn->renderDataCellContent()

#2 /var/www/html/sellers/protected/components/CGridViewPlus.php(617): CDataColumn->renderDataCell()

#3 /var/www/html/sellers/protected/components/CGridViewPlus.php(573): CGridViewPlus->renderTableRow()

#4 /var/www/html/sellers/protected/components/CGridViewPlus.php(483): CGridViewPlus->renderTableBody()

#5 /var/www/html/yii/framework/zii/widgets/CBaseListView.php(181): CGridViewPlus->renderItems()

#6 unknown(0): CGridViewPlus->renderSection()

#7 /var/www/html/yii/framework/zii/widgets/CBaseListView.php(164): preg_replace_callback()

#8 /var/www/html/yii/framework/zii/widgets/CBaseListView.php(149): CGridViewPlus->renderContent()

#9 /var/www/html/yii/framework/web/CBaseController.php(181): CGridViewPlus->run()

#10 /var/www/html/sellers/protected/views/app/productlist.php(116): AppController->widget()

#11 /var/www/html/yii/framework/web/CBaseController.php(126): require()

#12 /var/www/html/yii/framework/web/CBaseController.php(95): AppController->renderInternal()

#13 /var/www/html/yii/framework/web/CController.php(869): AppController->renderFile()

#14 /var/www/html/yii/framework/web/CController.php(782): AppController->renderPartial()

#15 /var/www/html/sellers/protected/controllers/AppController.php(181): AppController->render()

#16 /var/www/html/yii/framework/web/actions/CInlineAction.php(49): AppController->actionApprovedProductList()

#17 /var/www/html/yii/framework/web/CController.php(308): CInlineAction->runWithParams()

#18 /var/www/html/yii/framework/web/filters/CFilterChain.php(133): AppController->runAction()

#19 /var/www/html/yii/framework/web/filters/CFilter.php(40): CFilterChain->run()

#20 /var/www/html/yii/framework/web/CController.php(1145): CAccessControlFilter->filter()

#21 /var/www/html/yii/framework/web/filters/CInlineFilter.php(58): AppController->filterAccessControl()

#22 /var/www/html/yii/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()

#23 /var/www/html/yii/framework/web/CController.php(291): CFilterChain->run()

#24 /var/www/html/yii/framework/web/CController.php(265): AppController->runActionWithFilters()

#25 /var/www/html/yii/framework/web/CWebApplication.php(282): AppController->run()

#26 /var/www/html/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()

#27 /var/www/html/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()

#28 /var/www/html/sellers/index.php(13): CWebApplication->run()

REQUEST_URI=/products