AlainIb
AlainIb

Reputation: 4708

cakephp 2 non existing controller and files could not be found

I make debug on a website running on cakephp 2 (yes it's old i know)

I have strange errors i cannot resolve.

in log i have:

-Error: [MissingControllerException] Controller class Wp-login.phpController could not be found
-Error: [MissingControllerException] Controller ColonisersController could not be found.
-Error: [MissingActionException] Action ImgController::ui-bg_diagonals-thick_90_eeeeee_40x40.png() could not be found.
-Error: [MissingActionException] Action ImgController::moustique-tigre-default.png() could not be found.
...

I search over all the source code for Colonisers but it is not write even once (also i think ColonisersController is a renammed controller because it is misspelled).

I search over the web for the Wp-login.php and it is a wordpress page, so no link to cakephp at all, also not write anywhere in the source code.

Same story for the missings pngs files. not in the source code.

I try to clear the cache folder on server but problems remains.

I have ghost source code? file are somewhere in another cache ? any idea are welcomed.

Upvotes: 0

Views: 443

Answers (1)

ndm
ndm

Reputation: 60463

By default all request that do not map to an actual file are being passed over to CakePHP, where the app will try to match the request to a route, and if one is found, finally try to match it to a controller and an action.

You seem to have some rather unspecific routes defined that eat pretty much anything as a possible controller name, hence things are being passed further for searching for a matching a controller and an action, which is where the request flow will end, as no matching controller or action can be found - consequently a MissingControllerException or MissingActionException is being triggered, an error is being logged (by default all exceptions are being logged), and in production mode (debug = 0) the app will respond with a 404 error.

So, no ghosts, no cached files, that's just how things work.

Upvotes: 2

Related Questions