Controller's not working, shared hosting

EDIT: can this please be moved to "installation/setup"

I just moved my Yii app from localhost to shared hosting. (HostGator)

Now my controller isn’t working.

Yii ‘framework’ is behind web root. And Yii app is in web.

The index.php file is setup correctly. (no errors, I can access the app just fine)

But whenever I want to run my member list controller I get this error:

2011/09/10 02:14:30 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "member".' in /home/user/framework/web/CWebApplication.php:281

Stack trace:

#0 /home/user/framework/web/CWebApplication.php(136): CWebApplication->runController('member')

#1 /home/user/framework/base/CApplication.php(158): CWebApplication->processRequest()

#2 /home/user/APP/index.php(13): CApplication->run()

#3 {main} REQUEST_URI=/index.php?r=member

I enabled the paths in config/main.php so I access URL like this:


But to no avail… :frowning: I have been trying this for a few hours now and still cannot get it. Please help anyone.

I don’t know why /index.php?r=site/index works but not /index.php?r=member/view

I try changing the case to from ‘member’ to ‘Member’ and then I get

include(Member.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory


check your file/folder 's permissions. Maybe it is not readable by the server?

I am running into the same problem right now with a site. Only one controller is not working. Works fine on my dev box but not on a dedicated live linux build. No difference in permissions. Did you figure something out?


create in your webroot file (eg. test.php) and try to directly include your not working controller file and one that is working.

Check if there is any error related to file inclusion.

I just get Error 500. :angry:

Any chance to see the log files? Also, what is the default action of member? index? or it should be? member/index - member/view? How are your Url rules set? Pretty weird it can’t resolve the request…

Stack trace:

#0 /home/user/framework/web/CWebApplication.php(136): CWebApplication->runController('servicemember')

#1 /home/user/framework/base/CApplication.php(158): CWebApplication->processRequest()

#2 /home/user/APP/index.php(13): CApplication->run()

#3 {main} REQUEST_URI=/index.php?r=servicemember

So the URL is “servicemember” I apologise I was tired last night. However this shouldn’t change anything. I have tried “ServiceMember” and I get an error 500. Different from the error 400.

The default action is to load ‘itemView’=>’_view’, so it loads my "_view’ file.

The view file has



	'Service Members'=>array('index'),

So I guess yes it just indexes.

Everything works fine in localhost using WAMP.

This is what I am dealing with. Except my local dev box in on OSX without a stack.

Permissions are definitely not a problem either as I have taken them out of the equation. I am still getting Error 400 and that is if I try to use any action in that controller.

This is my error:

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

"peop/create".' in


Stack trace:

#0 /var/yii-1.1.8.r3324/framework/web/CWebApplication.php(136):


#1 /var/yii-1.1.8.r3324/framework/base/CApplication.php(158):


#2 .../index.php(13): CApplication->run()

#3 {main} REQUEST_URI=/peop/create

Even stripping my controller down to have nothing but actionIndex this works on dev but not live.

mmm… how is your controller class named? ServiceMemberController or ServicememberController? In case of ServiceMemberController, could you name it to ServicememberController instead? I think is an issue with that as Windows tends to be not as rigid as Linux with names. In Linux servicemember wont match Servicemember or serviceMember… make sure your class also matches the class name.

Antonio Ramirez thanks so much, you have solved my problem!



I changed the model name from "Servicemember" to "ServiceMember" I also changed the controller to what you said "ServicememberController"

After doing this, I got a new error “the table name ServiceMember doesn’t exist”

So I checked my database and saw it was called "servicemember" I promptly changed to "ServiceMember" and it works!!!!!!!!!!

I installed Yii User extension and whenever I attempt to login it just returns me back to the login page. I think it’s something similar because it works in localhost and not on shared. I’m just glad I got my main app working.

If you haven’t already I would take a look at userGroups, much more advanced but still easy enough to make it your own. I have it working in both shared/dedicated environments.

Will do - did you need to change any of the names to get it working on shared/linux ?

EDIT: Just installed userGroups and it’s working. (logout and login works!) Thanks man.

Yes it is a great extension out of the box. As with anything I do a number of tweaks to fit the given app but very impressed with what nickcv has done with this. Huge time savor.

The fact that no case sensitive problems have arisen is a good one. :D

you can put ‘caseSensitive’ => false, in your url manager and that is how I overcame the problems I was experiencing with this site. userGroups will not work with that defined though. I brought that up to nickcv but have not dug into what is causing it. Easy enough to make sure I pay attention to what we both learned in this thread.