| View previous topic :: View next topic |
| Author |
Message |
vermoos
Joined: Tue Nov 22, 2011 2:29 pm Posts: 4
|
Posted: Tue Nov 22, 2011 3:11 pm Post subject: CakePHP tutorial: URL not found |
|
|
Hello,
I am following the CakePHP tutorial by Graham Weldon (LXF139).
The root document ~/localhost/library/index.php says
Your tmp directory is writable.
Your database configuration file is present.
Cake is able to connect to the database.
I have edited ~/config/database.php, the password is set and the mysql server is running fine.
After baking the models, controllers and views, when I go to ~/localhost/library/users I get
"NOT FOUND"
"The requested URL /library/users was not found on this server."
It should display "an empty list and some actions down the side."
When I go to ~/localhost/views/users, the directory *contents* are displayed in list form - not what the tutorial intends, I assume, unless ~/localhost/users is a typo.
Other pages like ~/webroot/test.php are found and displayed correctly so the site is picking up php pages on the FS, just not the ones I am expecting it to... is this because the MVC workflow has not kicked in, or is it a problem with the URI?
Any ideas how I can establish what the problem is (with my limited php knowledge) - I don't think it is the database (?)
with thanks
Mic |
|
| Back to top |
|
 |
vermoos
Joined: Tue Nov 22, 2011 2:29 pm Posts: 4
|
Posted: Thu Nov 24, 2011 2:03 pm Post subject: UPdate: |
|
|
The URL NOT FOUND problem has changed into another problem.
I compiled apache with the --enable-rewrite option and reinstalled apache and php.
Now I get the green bars at the page
" Sweet, "Library" got Baked by CakePHP! "
(this did not happen without --enable-rewrite).
phpinfo() displays in webroot, but not in any directory below:
Missing Controller
Error: Testpage.phpController could not be found.
The phpinfo() script worked fine in all directories prior to reinstalling apache.
The "missing controller" must be due to the way the server locates files.
Or is there a config setting I need to change?
Hmmm... |
|
| Back to top |
|
 |
vermoos
Joined: Tue Nov 22, 2011 2:29 pm Posts: 4
|
Posted: Fri Nov 25, 2011 11:24 am Post subject: UPDATE 2 |
|
|
phpinfo() displays in the DocumentRoot and in any *empty* folder beneath but..
after: "cake bake project TEST"
phpinfo() does *not* display in the TEST directory
The "Missing Controller" error is not removed by baking the models, views and controllers. |
|
| Back to top |
|
 |
vermoos
Joined: Tue Nov 22, 2011 2:29 pm Posts: 4
|
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|