0
votes

I've been reading this tutorial of how to build a simple blog using cakephp :

http://book.cakephp.org/view/1536/Creating-Post-Views

I followed the instructions "to the letter" but I haven't been able to access my "views"(index, view):

In both cases I got the same message :

  • Oops! This link appears to be broken.(in chrome)
  • The webpage cannot be found (IE)

EDIT:

I kept reading the tutorial and when I got to this part:

book.cakephp.org/view/1541/Routes

I started to play with the definition of the default root route (app\config\routes.php):

  • Router::connect('/', array('controller' => 'posts', 'action' => 'index'));

  • Router::connect('/', array('controller' => 'posts', 'action' => 'add'));

  • Router::connect('/', array('controller' => 'posts', 'action' => 'edit',3));

and much to my surprise, now I was finally able to see those views, does any of this gave you any idea what the problem could be? and regarding to the httpd.conf file, I found two files with the same name and I must admit I have no idea which one you are referring to :

  • C:\wamp\bin\apache\apache2.2.8\conf\httpd.conf
  • C:\wamp\bin\apache\apache2.2.8\conf\original\httpd.conf
1
If you're getting those messages, then it sounds like the web server installed on you computer isn't running. Have you installed apache or iis and are you sure it's running? Can you get a test HTML page working first? These error aren't indicative of a cake problem. - Scott Harwell
Do you use apache? Do you have the extension mod_rewrite enabled? - sod
@sod- yes I have Apache and if mod_rewrite is the same as rewrite_module, yes I got it enabled. - eddy
@Scott Harwell, good point +1 - benjamin
Also, when working with cake. Always test that the CakePHP test page shows up properly. It lists any detectable known problems. Work from there - JohnP

1 Answers

0
votes

It looks to me like something isn't quite right with the mod_rewrite. If it were, the links to the posts controller would say the controller was missing or the view was missing, etc.

The first thing I would check would be that your httpd.conf section concerning the Directory where your files are stored allows htaccess overrides. If it says none, set it to all, then restart apache.

http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride