0

I'm trying to bake my first CakePHP application and am unable to get any page to particularly load for me right now. I've updated my config settings for salt,database, etc. and the index.php page tells me that I have configured everything.

So far I've used cake bake all on just one database table so far to make sure it loads properly. I created the Model, Controller, and View for the standard add/index/view/edit pages. When I try to access URL/organizations/index.php I'm hitting a 404 error however.

Is there any troubleshooting someone might have advice for how to solve this one? It is confusing to me that the index.php loads (so it redirects properly when loading the webroot) but trying to view any View pages yields no results. Is there any debug commands I can do to view what the valid pages would be? Or any additional information I can provide?

3 Answers3

1

If you try URL/index.php/organisations or something similar to this and it works, then there is an issue with URL re-writing on the server which you'll need to correct.

Colonel Mustard
  • 1,482
  • 2
  • 17
  • 42
0

I believe if you have things set up correctly you would want to visit /organizations in order to access the index() method of the organizations controller.

In general the ".php" is left off of the URL, as your index.php file initiates all the bootstrapping and routing. This also requires a correct .htaccess setup. Hard to say exactly what the problem is without seeing the app or an error message.

csum
  • 1,782
  • 13
  • 15
0

Try in url

URL/organizations/index.php 

To

URL/organizations/index 
or 
URL/organizations/index.ctp

Cakephp using .ctp extension, that means cakephp Template. Please see this link. And also you can see your app\view\Organizations folder. Here all file is with .ctp extension. Isn't it ?

Community
  • 1
  • 1
Alimon Karim
  • 4,354
  • 10
  • 43
  • 68