Ch 3 items_controller.php is not found

4 messages Options
Embed this post
Permalink
David Feagin

Ch 3 items_controller.php is not found

Reply Threaded More More options
Print post
Permalink
In the launching the application section in chapter 3, entering the url  http://localhost/todo/items I get the error
ItemsController could not be found.
Create the class ItemsController below in file: app\controllers\items_controller.php

Everything has worked up to this point.  I have a correctly named items_controller.php in c:\wamp\www\todo\app\controllers with the correct code in it, but cake is not seeing it.

My operating system is Vista.  I am using cake 1.3 with wamp with apache 2.2.11, php 5.3 and mysql 5.1.36.  I have tried cake 1.2 with apache 2.0.63 and php 5.3.0 and have installed xampp.  I have set the allow override to all in httpd.config and loaded the rewrite module in all installs.  I have double checked that I have followed all instructions I could find in the book.

Is there a setting that is not listed in the book?  Any information would be appreciated, I am at a total loss.
davidgolding

Re: Ch 3 items_controller.php is not found

Reply Threaded More More options
Print post
Permalink
I imagine the problem has to do with using PHP 5.3 with Cake 1.3. You may want to check your error logs to see if a PHP error is turning up that's preventing Cake from mapping the routes correctly.
--Dave

Author, "Beginning CakePHP: From Novice to Professional"

[ get your copy at: http://www.amazon.com/Beginning-CakePHP-Novice-Professional/dp/1430209771/ ]
David Feagin

Re: Ch 3 items_controller.php is not found

Reply Threaded More More options
Print post
Permalink
I am not finding any PHP error logs until I modify the file to use <?php instead of <?.  It then gives me Fatal error: Class 'Item' not found in C:\wamp\www\todo\cake\libs\class_registry.php on line 147.  I am not sure why this is showing up, but the path to C:\wamp\www\todo\app\controllers\items_controller.php is ok.  What versions Apache, MySql, PHP and Cake should we be using?  What versions are you using?
David Feagin

Re: Ch 3 items_controller.php is not found

Reply Threaded More More options
Print post
Permalink
In reply to this post by davidgolding
I found that if I put <?php to start C:\wamp\www\todo\app\models\item.php as well, my problem goes away.