Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CakePHP tutorial: URL not found

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
vermoos



Joined: Tue Nov 22, 2011 2:29 pm
Posts: 4

PostPosted: Tue Nov 22, 2011 3:11 pm    Post subject: CakePHP tutorial: URL not found Reply with quote

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
View user's profile Send private message
vermoos



Joined: Tue Nov 22, 2011 2:29 pm
Posts: 4

PostPosted: Thu Nov 24, 2011 2:03 pm    Post subject: UPdate: Reply with quote

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
View user's profile Send private message
vermoos



Joined: Tue Nov 22, 2011 2:29 pm
Posts: 4

PostPosted: Fri Nov 25, 2011 11:24 am    Post subject: UPDATE 2 Reply with quote

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
View user's profile Send private message
vermoos



Joined: Tue Nov 22, 2011 2:29 pm
Posts: 4

PostPosted: Mon Nov 28, 2011 5:17 pm    Post subject: SOLVED (sort of) Reply with quote

To save anyone the bother: all of the above problems are solved by using cakephp-instaweb

http://chris-lamb.co.uk/projects/cakephp-instaweb/
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast