Help CakePHP (tutorial in LXF)

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Help CakePHP (tutorial in LXF)

Postby gazza7 » Sat Oct 16, 2010 2:32 pm

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.
gazza7
 
Posts: 5
Joined: Wed Feb 27, 2008 12:57 pm

reply

Postby gazza7 » Sat Oct 16, 2010 2:42 pm

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?
gazza7
 
Posts: 5
Joined: Wed Feb 27, 2008 12:57 pm

Re: reply

Postby gazza7 » Sat Oct 16, 2010 4:03 pm

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.
gazza7
 
Posts: 5
Joined: Wed Feb 27, 2008 12:57 pm

Postby stu » Sat Oct 16, 2010 11:05 pm

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: Select all
        <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: Select all
RewriteBase /cakephp/
stu
 
Posts: 7
Joined: Mon Aug 25, 2008 10:01 pm
Location: Northern Ireland

More help needed with cake...please

Postby Ludek » Thu Nov 25, 2010 8:38 pm

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 8)
Ludek
 
Posts: 2
Joined: Mon Jan 14, 2008 8:55 pm

'Missing Controller' message.

Postby pengythai » Mon Nov 29, 2010 1:56 pm

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
pengythai
 
Posts: 7
Joined: Wed Jan 11, 2006 9:19 am
Location: Bangkok

Postby Ludek » Mon Nov 29, 2010 8:41 pm

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 8)
Ludek
 
Posts: 2
Joined: Mon Jan 14, 2008 8:55 pm


Return to Programming

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest