# Cakephp 2.8 not work on hostgator.com server

**URL:** <https://discourse.cakephp.org/t/cakephp-2-8-not-work-on-hostgator-com-server/1749>\
**Category:** Need Help\
**Created:** [December 17, 2016, 9:22am UTC](https://discourse.cakephp.org/t/cakephp-2-8-not-work-on-hostgator-com-server/1749 "2016-12-17T09:22:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alok](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@alok](https://discourse.cakephp.org/u/alok)\
**Post date:** [December 17, 2016, 9:22am UTC](https://discourse.cakephp.org/t/cakephp-2-8-not-work-on-hostgator-com-server/1749/1 "2016-12-17T09:22:37Z")

</div>

my project is working fine on localhost and another server like [hostgator.in](http://hostgator.in) server php version is 5.4.43 but not working on [hostgator.com](http://hostgator.com) server php version is 5.4.45

show error

UsersController::login() - APP/Controller/UsersController.php, line 502  
ReflectionMethod::invokeArgs() - [internal], line ??  
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 490  
Dispatcher::\_invoke() - CORE/Cake/Routing/Dispatcher.php, line 191  
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 165  
[main] - APP/webroot/index.php, line 108

UsersController.php

public $helpers = array(‘Session’, ‘Html’, ‘Time’, ‘Form’, ‘Paginator’, ‘Text’,‘Image’);  
public $components = array(‘Session’, ‘RequestHandler’, ‘Auth’,‘Paginator’,‘Cookie’, ‘Search’);  
public $uses = array(‘User’,‘UserType’,‘UserVsType’,‘Subscriber’,‘Viewer’,‘Customer’,‘Setting’,‘Company’,‘Industry’,‘UserVsIndustry’,‘EmailTemplate’);  
public $name = ‘Users’;

```
public function beforeFilter() {AuthComponent::$sessionKey = 'Auth.User'; 
        $this->Auth->loginAction = array('controller'=>'users','action'=>'login');
        $this->Auth->loginRedirect = array('controller'=>'users','action'=>'dashboard');
        $this->Auth->logoutRedirect = array('controller'=>'/','action'=>'');
        $this->Auth->authenticate = array(
            'Form' => array(
                'userModel' => 'User'
                ));
                    if(!defined('REQUESTED_URL')){
                            define('REQUESTED_URL',$_SERVER['REQUEST_URI']);
                    }

                    $natureType = array(1=>'Super Admin Tecoholics', 2 =>'Company Admin', 3 =>'Survey recipient');

                    $this->set(compact('natureType'));	
                }

    public function isAuthorized($user) {	 
        return true;
    }
```
