Re: the blog post problem
when i bypass the rewrite, it gives me the fancy cake layout but still the same result, i am going to try to install xampp now! On Mar 11, 9:58 am, Jon Bennett wrote: > Hi bilal, > > > You are right, all three files are different, the server had > > mod_rewrite off, i turned it on and tried again but it didnt help. :( > > > what else could we look at ... > > hmm - is the html helper outputting links with index.php in them, or > are you doing this manually? Does the site work if you manually try > urls without index.php in them? what about when you bypass rewrite > altogether, eg: > > http://domain.com/index.php?url=/posts/index > > cheers, > > Jon > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
Hi bilal, > You are right, all three files are different, the server had > mod_rewrite off, i turned it on and tried again but it didnt help. :( > > what else could we look at ... hmm - is the html helper outputting links with index.php in them, or are you doing this manually? Does the site work if you manually try urls without index.php in them? what about when you bypass rewrite altogether, eg: http://domain.com/index.php?url=/posts/index cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
Hi Jon, You are right, all three files are different, the server had mod_rewrite off, i turned it on and tried again but it didnt help. :( what else could we look at ... On Mar 11, 4:58 am, Jon Bennett wrote: > Hi bilal, > > > all three htaccess files are there, but i still have to type index.php > > to access, this is how my .htaccess files looks like > > > > > RewriteEngine on > > RewriteRule ^$ app/webroot/ [L] > > RewriteRule (.*) app/webroot/$1 [L] > > > > Hmm, you should have 3 different htaccess files, but other than that, > it appears to be a server issue, does the live server have mod_rewrite > on? > > Cheers, > > Jon > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
Hi bilal, > all three htaccess files are there, but i still have to type index.php > to access, this is how my .htaccess files looks like > > >RewriteEngine on >RewriteRule^$ app/webroot/[L] >RewriteRule(.*) app/webroot/$1 [L] > Hmm, you should have 3 different htaccess files, but other than that, it appears to be a server issue, does the live server have mod_rewrite on? Cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
Hi Jon, all three htaccess files are there, but i still have to type index.php to access, this is how my .htaccess files looks like RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] thanks for helping out On Mar 10, 6:40 am, Jon Bennett wrote: > Hi bilaliz, > > > its WAMP server that i have installed on my notebook, the way i > > learned to deploy was to simply download cake and copy all files in to > > the www folder and i should able to see the default cake index, and > > indeed that worked .. > > so for example my views are in D:\wamp\www\app\views\posts > > As it's a WAMP server, I would expect you not to need 'index.php' in > the URLs. Do you have the required 3 .htaccess files in place? > > Cheers, > > Jon > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
Hi bilaliz, > its WAMP server that i have installed on my notebook, the way i > learned to deploy was to simply download cake and copy all files in to > the www folder and i should able to see the default cake index, and > indeed that worked .. > so for example my views are in D:\wamp\www\app\views\posts As it's a WAMP server, I would expect you not to need 'index.php' in the URLs. Do you have the required 3 .htaccess files in place? Cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
its WAMP server that i have installed on my notebook, the way i learned to deploy was to simply download cake and copy all files in to the www folder and i should able to see the default cake index, and indeed that worked .. so for example my views are in D:\wamp\www\app\views\posts --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
> Blog posts > link("Add Post", "/posts/add"); ?> > > > Id > Title > Action > Created > > > > > > > > > $html->link($post['Post']['title'],'/posts/view/'.$post > ['Post']['id']);?> > > > link( > 'Delete', > "/posts/delete/{$post['Post']['id']}", > null, > 'Are you sure?' > )?> > link('Edit', > '/posts/edit/'.$post['Post']['id']);? > > > > > > > > > > - > > > Add Post >echo $form->create('Post'); > echo $form->input('title'); > echo $form->input('body', array('rows' => '3')); > echo $form->end('Save Post'); > ?> > --- > Edit Post > echo $form->create('Post', array('action' => 'edit')); > echo $form->input('title'); > echo $form->input('body', array('rows' => '3')); > echo $form->input('id', array('type'=>'hidden')); > echo $form->end('Save Post'); > ?> All your views look ok > my urls: http://localhost/index.php/posts/index > http://localhost/index.php/posts/view/1 > http://localhost/index.php/posts/edit/1 > http://localhost/index.php/posts/add A couple of Qs: - what are you testing/deploying on? - is your cake app (app/core/vendors etc) in the route of your test server, or should the urls in fact be: http://localhost/cakedir/posts/index http://localhost/cakedir/posts/view/1 http://localhost/cakedir/posts/edit/1 http://localhost/cakedir/posts/add Cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
thanks for replying folks, i am posting my index, add and edit as well as the urls below i have looked through all, but still have got no clue . Blog posts link("Add Post", "/posts/add"); ?> Id Title Action Created link($post['Post']['title'],'/posts/view/'.$post ['Post']['id']);?> link( 'Delete', "/posts/delete/{$post['Post']['id']}", null, 'Are you sure?' )?> link('Edit', '/posts/edit/'.$post['Post']['id']);? > - Add Post create('Post'); echo $form->input('title'); echo $form->input('body', array('rows' => '3')); echo $form->end('Save Post'); ?> --- Edit Post create('Post', array('action' => 'edit')); echo $form->input('title'); echo $form->input('body', array('rows' => '3')); echo $form->input('id', array('type'=>'hidden')); echo $form->end('Save Post'); ?> - my urls: http://localhost/index.php/posts/index http://localhost/index.php/posts/view/1 http://localhost/index.php/posts/edit/1 http://localhost/index.php/posts/add --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
Same as Marcelo: Have a look at the view for index action - And a closer look at the area, where links for add-, edit- and delete-action are defined. Is there is something called like .../posts/posts instead of .../posts/ edit ? On Mar 7, 6:50 pm, brian wrote: > What do the URLs look like? Paste an example here. > > Also, do you have any routes set up for Posts? You shouldn't > necessarily need any but, if you have created some Post routes, they > may be the source of the problem. > > On Sat, Mar 7, 2009 at 4:19 AM, bilal wrote: > > > indeed i am a noob with PHP & Cake, thats why i am having such a silly > > problem, i have the latest stable release > > have followed the example and went over it several times to ensure > > that i am not missing out on something, i can get the index page, > > which looks like this > > > CakePHP: the rapid development php framework > > Blog posts > > Add Post Id Title Action Created > > 1 The title Delete Edit 2009-03-06 07:58:15 > > 2 A title once again Delete Edit 2009-03-06 07:58:16 > > 3 Title strikes back Delete Edit 2009-03-06 07:58:25 > > > (default) 1 query took 0 ms Nr Query Error Affected Num. rows Took > > (ms) > > 1 SELECT `Post`.`id`, `Post`.`title`, `Post`.`body`, `Post`.`created`, > > `Post`.`modified` FROM `posts` AS `Post` WHERE 1 = 1 3 3 0 > > > however ass soon as i click on ANY of the links i get the following > > error (including delete, edit& Ad Post) > > > Missing Method in PostsController > > Error: The action posts is not defined in controller PostsController > > > Error: Create PostsController::posts() in file: app\controllers > > \posts_controller.php. > > > > class PostsController extends AppController { > > > var $name = 'Posts'; > > > function posts() { > > > } > > > } > > ?> > > Notice: If you want to customize this error message, create app\views > > \errors\missing_action.ctp. > > > here is what my posts_controller.php looks like > > > > class PostsController extends AppController { > > > function index() { > > $this->set('posts', $this->Post->find('all')); > > } > > > function view($id) { > > $this->Post->id = $id; > > $this->set('posts', $this->Post->read()); > > > } > > > function add() { > > if (!empty($this->data)) { > > if ($this->Post->save($this->data)) { > > $this->flash('Your post has been saved.', > > '/posts'); > > } > > } > > } > > function edit($id = null) { > > $this->Post->id = $id; > > if (empty($this->data)) { > > $this->data = $this->Post->read(); > > } else { > > if ($this->Post->save($this->data)) { > > $this->flash('Your post has been updated.','/posts'); > > } > > } > > } > > > } > > ?> > > > please help! --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
What do the URLs look like? Paste an example here. Also, do you have any routes set up for Posts? You shouldn't necessarily need any but, if you have created some Post routes, they may be the source of the problem. On Sat, Mar 7, 2009 at 4:19 AM, bilal wrote: > > indeed i am a noob with PHP & Cake, thats why i am having such a silly > problem, i have the latest stable release > have followed the example and went over it several times to ensure > that i am not missing out on something, i can get the index page, > which looks like this > > CakePHP: the rapid development php framework > Blog posts > Add Post Id Title Action Created > 1 The title Delete Edit 2009-03-06 07:58:15 > 2 A title once again Delete Edit 2009-03-06 07:58:16 > 3 Title strikes back Delete Edit 2009-03-06 07:58:25 > > > > (default) 1 query took 0 ms Nr Query Error Affected Num. rows Took > (ms) > 1 SELECT `Post`.`id`, `Post`.`title`, `Post`.`body`, `Post`.`created`, > `Post`.`modified` FROM `posts` AS `Post` WHERE 1 = 1 3 3 0 > > > however ass soon as i click on ANY of the links i get the following > error (including delete, edit& Ad Post) > > Missing Method in PostsController > Error: The action posts is not defined in controller PostsController > > Error: Create PostsController::posts() in file: app\controllers > \posts_controller.php. > > class PostsController extends AppController { > > var $name = 'Posts'; > > > function posts() { > > } > > } > ?> > Notice: If you want to customize this error message, create app\views > \errors\missing_action.ctp. > > > here is what my posts_controller.php looks like > > class PostsController extends AppController { > > function index() { > $this->set('posts', $this->Post->find('all')); > } > > function view($id) { > $this->Post->id = $id; > $this->set('posts', $this->Post->read()); > > } > > function add() { > if (!empty($this->data)) { > if ($this->Post->save($this->data)) { > $this->flash('Your post has been saved.', > '/posts'); > } > } > } > function edit($id = null) { > $this->Post->id = $id; > if (empty($this->data)) { > $this->data = $this->Post->read(); > } else { > if ($this->Post->save($this->data)) { > $this->flash('Your post has been updated.','/posts'); > } > } > } > > } > ?> > > please help! > > > > --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the blog post problem
On Sat, Mar 7, 2009 at 6:19 AM, bilal wrote: > > however ass soon as i click on ANY of the links i get the following > error (including delete, edit& Ad Post) > > Missing Method in PostsController > Error: The action posts is not defined in controller PostsController How your views looks like? -- MARCELO DE F. ANDRADE (aka "eleKtron") Belem, PA, Amazonia, Brazil Linux User #221105 [...@pará ~]# links http://pa.slackwarebrasil.org/ --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---