Sunday, August 29, 2010

missing controller in wamp advanced installation

Apologies if this has already been discussed in the group, but I could
not find it. I have an advanced installation on Windows running wamp,
which I tested first with the app folder containing webroot at the
document root and the cake libraries above the document root. The
initial test setup worked as expected. I then moved the app folder to
the same level as the cake core libraries and left the webroot folder
in the document root. This is when I began to get the missing
controller error.

My installation uses the following structure.

from Start>Run>notepad \wamp\www\testweb\index.php

if (!defined('ROOT')) {
define('ROOT', DS.'wamp'.DS.'cake'.DS.'1.3.x');
}
if (!defined('APP_DIR')) {
define('APP_DIR', 'test');
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS.'wamp'.DS.'cake'.DS.'1.3.x');
}

When I load http://localhost/testweb/, I get the default home view
with four green bars. I have a controller and model set up as follows.

Start>Run>\wamp\cake\1.3.x\test\controllers\profiles_controller.php:

<?php
class ProfilesController extends AppController {
var $name = 'Profiles';
var $scaffold;
}
?>

Start>Run>\wamp\cake\1.3.x\test\models\profile.php:

<?php
class Profile extends AppModel {
var $name = 'Profile';
}
?>

When I load http://localhost/testweb/profiles, I get the missing
controller message.


CakePHP: the rapid development php framework

Missing Controller
Error: ProfilesController could not be found.

Error: Create the class ProfilesController below in file: test
\controllers\profiles_controller.php

<?php
class ProfilesController extends AppController {

var $name = 'Profiles';
}
?>
Notice: If you want to customize this error message, create test\views
\errors\missing_controller.ctp

My take is that for some reason the core libraries are in scope but
the app is not, and I really have no clue as to why.

Apache returns a 200 status code on the request which suggests that
the .htaccess is set up correctly.
127.0.0.1 - - [29/Aug/2010:00:36:58 -0700] "GET /testweb/profiles HTTP/
1.1" 200 1470

My cake console works as expected, so my paths for cake and php must
be good. Seems like something internal to cake. I am very discouraged
to be fumbling around with this problem and would love it if someone
would point out what I am missing.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate