Unable to resolve the request yii

Unable to resolve the request yii

Questions : Unable to resolve the request yii


I am new in Yii and sorry to say that anyone in4codes_yii help me please that why the controller in4codes_yii employeController.php not called , I check in4codes_yii and set many files permission etc ,

Here is my url in4codes_yii http://dxb.softmatics.com:81/erp/index.php/employe/index

Controller : /………for on board in4codes_yii controller…./

class employeController extends Controller{ /** * Declares class-based actions. */ public function actions() { return array( 'page'=>array( 'class'=>'CViewAction', ), ); } /** * for index page */ public function actionIndex() { echo 'in index'; exit; } }//...end of class  

If any thing else I will show you my code in4codes_yii like config etc

Total Answers 4

Answers 1 : of Unable to resolve the request yii

You have to call the controller as:


In your case:


Also, you can add modules, such as:


Reference: Controller



Answers 2 : of Unable to resolve the request yii

This URL is working: in4codes_php dxb.softmatics.com:81/erp/index.php?r=employe/index

but if you don’t see your echo in index in4codes_php – the problem is: in the layout you in4codes_php should to set name of default controller in4codes_php – not Site, but Employe (you can set in4codes_php proper name for each layout)

or set in config.php default controller in4codes_php as employe if you have one.



Answers 3 : of Unable to resolve the request yii

The problem is case of controller name in4codes_php and its file. It should be in4codes_php EmployeController and in4codes_php EmployeController.php. Yii will in4codes_php capitalize controller name defined in in4codes_php route and will look for controller at in4codes_php controllers/EmployeController.php. For in4codes_php case sensitive filesystems (like in in4codes_php Linux) file will not be found, so Yii in4codes_php will assume that controller does not in4codes_php exist and will return 404 error.



Answers 4 : of Unable to resolve the request yii

I had an issue where the in4codes_php controller/action was working fine on in4codes_php local (MAC OS X) but not on my server in4codes_php (Linux).

The issue was that the PHP opcache on in4codes_php the server needed to be flushed.

Hope this helps someone struggling with in4codes_php a similar issue!