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 

Help CakePHP (tutorial in LXF)

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



Joined: Wed Feb 27, 2008 12:57 pm
Posts: 5

PostPosted: Sat Oct 16, 2010 3:32 pm    Post subject: Help CakePHP (tutorial in LXF) Reply with quote

Hi

I have followed the tutorial up to listing 1, but when I try get the web page to show with the following url nothing shows. localhost/cakephp/movies/index i just get the message Not Found The requested URL /cakephp/movies/index was not found on this server. I have tried different paths- even to where the file index.ctp is located, which shouldn't be the case.

Please Help.
Back to top
View user's profile Send private message
gazza7



Joined: Wed Feb 27, 2008 12:57 pm
Posts: 5

PostPosted: Sat Oct 16, 2010 3:42 pm    Post subject: reply Reply with quote

Hi

On the index page it says to change the content of this page, create: APP/views/pages/home.ctp , which I did but nothing happens. It seems nothing is working. because if you can't change the index page which came with cakephp with their instructions, what chance have you got with these tutorials?
Back to top
View user's profile Send private message
gazza7



Joined: Wed Feb 27, 2008 12:57 pm
Posts: 5

PostPosted: Sat Oct 16, 2010 5:03 pm    Post subject: Re: reply Reply with quote

gazza7 wrote:
Hi

On the index page it says to change the content of this page, create: APP/views/pages/home.ctp , which I did but nothing happens. It seems nothing is working. because if you can't change the index page which came with cakephp with their instructions, what chance have you got with these tutorials?
Reinstalled cakePHP can now change the index page as it suggest, but still the tutorial isn't working.
Back to top
View user's profile Send private message
stu



Joined: Mon Aug 25, 2008 11:01 pm
Posts: 7
Location: Northern Ireland

PostPosted: Sun Oct 17, 2010 12:05 am    Post subject: Reply with quote

Have you installed mod_rewrite on your server? You will need to install it to get the URLs to work correctly.

Assuming you are running apache you will need to modify the configuration file for your site to enable mod_rewrite. In Debian the configuration for the default site is /etc/apache2/sites-available/default. You will find a section of code like this

Code:
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>


You will need to change "AllowOverride None" to "AllowOverride All".

I'm guessing from the URL you have posted that you have put the Cake install inside a folder called cakephp, if that is the case, you will also need to add the following line to the file ".htaccess" in the cakephp folder and cakephp/app/webroot.
Code:
RewriteBase /cakephp/
Back to top
View user's profile Send private message
Ludek



Joined: Mon Jan 14, 2008 8:55 pm
Posts: 2

PostPosted: Thu Nov 25, 2010 8:38 pm    Post subject: More help needed with cake...please Reply with quote

Hello All,

I've been trying to follow this tutorial and so far I've got my green bars in the cake login screen and I moved on to creating the controller and first view as described.

I created the controller and saved it to /app/controllers and the first view index.ctp which I saved to apps/views/movies and...

...the result is a 'Missing Controller' message.

I've tried to check with various forums on the web with no success - can anyone point out the error of my ways - please!

PS I have done all the edits as mentioned on this thread.

Many thanks,

Ludek Cool
Back to top
View user's profile Send private message
pengythai



Joined: Wed Jan 11, 2006 9:19 am
Posts: 7
Location: Bangkok

PostPosted: Mon Nov 29, 2010 1:56 pm    Post subject: 'Missing Controller' message. Reply with quote

Hi There,
I was stuck with the missing controller message for a while.
But I noticed the text from within the movies_controller.php file was being displayed on the top line of the page. So adding <?php and ?> to the beginning and end of the file fixed the problem.

Hope this helps
Back to top
View user's profile Send private message
Ludek



Joined: Mon Jan 14, 2008 8:55 pm
Posts: 2

PostPosted: Mon Nov 29, 2010 8:41 pm    Post subject: Reply with quote

Hello,

Thanks for the reply.

Nope, spotted that little omission and I've got all my php tags in place.

Could this be a paths issues?

Has anyone actually completed the project yet? If you have would you mind posting your code and directory setup?

Ludek Cool
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