Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP cannot find UsersController

Tags:

php

cakephp

I have been following the blog tutorial on cakephp.org and I had adding and editing the posts table working fine. I wanted to add a user login but I am having trouble when following the tutorial. When I run my application now I keep getting the error:

Error: UsersController could not be found.

Error: Create the class UsersController below in file: app/Controller/UsersController.php

I know the controller is definitely there, I followed naming conventions, and I can't find any errors in the code for UsersController.php or anything else. Does anyone have any idea why this may be happening?

EDIT: clearing caches don't seem to be the problem. All that is there is an empty text file.

Thanks, Jon

like image 215
Jon Haller Avatar asked Aug 26 '26 08:08

Jon Haller


1 Answers

Check file permissions, it should be readable by everyone.

Clear your cache in /app/tmp/cache/models, /app/tmp/cache/persistent

like image 73
rrd Avatar answered Aug 27 '26 23:08

rrd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!