The URL you should access is http://click-2-run.com/cakephp/app/posts/index - without .php file name extension.
In CakePHP you're accessing actions defined in controller, not files. For this reason there are no file name extensions. They can be enabled in the router configuration though: http://book.cakephp.org/view/952/File-extensions On Oct 10, 9:46 pm, Jeff <[email protected]> wrote: > Not sure why, but I'm the lucky guy that gets to spend WAYYYY more > than 15 minutes on a 'simple' demo. Admittedly I'm a noob, but one > would think that something this basic should work. > > I dutifully copied and pasted the code from the tutorial examples in > to php files and uploaded them to my webserver, then I went to the > url > as described in the tutorial - and Cake doesn't seem to be the least > bit interested. I know the file is in the right place (per the > instructions in the tutorial), but here's what I get: > > Missing Method in PostsController > > Error: The action index.php is not defined in controller > PostsController > > Error: Create PostsController::index.php() in file: app/controllers/ > posts_controller.php. > <?php > class PostsController extends AppController { > > var $name = 'Posts'; > > function index.php() { > > } > > } > > ?> > > Notice: If you want to customize this error message, create app/ > views/ > errors/missing_action.ctp. > > So that's all well and good - it wants the basic PostsController > class > to extend AppController ... but here's the contents of my file in > exactly the right place: > > <?php > class PostsController extends AppController { > var $name = 'Posts'; > function index() { > $this->set('posts', $this->Post->find('all')); > } > function view($id = null) { > $this->Post->id = $id; > $this->set('post', $this->Post->read()); > } > > } > > ?> > > The test project is located athttp://Click-2-Run.com/cakephp/app/ > > The URL I entered to try the project out > ishttp://click-2-run.com/cakephp/app/posts/index.php > > ... and yes, I checked - the .htaccess files WERE uploaded when I > unzipped and uploaded Cake to the server. > > So now what? Anyone with help ... please? 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
