Your first bite of CakePHP

Published on and tagged with cakephp  tutorial

Fabio Cevasco has written another introductory article about CakePHP, this time on sitepoint.com. It is a good read for newbies, but if you have already done your first steps with CakePHP you probably know the things explained in the article.

15 comments baked

  • Fabio Cevasco

    Yes, I agree… I wrote this a few months ago actually (and kept updating it with the help of the CakePHP guys) and it got published as a featured article just yesterday…

  • Guy

    Nonetheless, as a newbie baker, I appreciate Fabio’s efforts.

    Sure, his recent article resembles the ‘Blog tutorial’ in the manual, but for a newbie, this is very useful. The manual is useful, but lacks of examples, and is sometimes confusing.

    I’m trying to improve with CakePHP, and I’m eager to find code samples.

    And in fact, when Fabio feels like writing more advanced tutorials, I would certainly be his guest ! ;-)

  • cakebaker

    @Guy: If you miss examples in the manual, please open doc tickets on http://trac.cakephp.org . As the people working on the manual are no newbies it is good to hear what newbies miss. So let us know what we can improve!

  • Wendell

    Hello,

    I’m new to CakePHP, on my first cake setup, i tried to follow the tutorial and create files as stated but it seems I can’t access the page that I’m suppose to access like app/views/users/register.thtml. Its giving me this error below:

    Not Found

    The requested URL /cake/users was not found on this server.

    I already created the controller(app/controllers/users_controller) and the model (app/models/user.php) for this one. Maybe I miss something out.

    Your help is greatly appreciate. Thank you very much.

    Wendell

  • cakebaker

    @Wendell: Sounds like a mod_rewrite issue, have a look at the section “Configuring Apache and mod_rewrite” in the manual.

    HTH

  • Wendell

    @cakebaker: Thank you for your response. Yes you are right, the problem is related to mod_rewrite and it is okay now.

    Though, I have encountered another issue and this is related to Captcha. I can’t get the Captcha image to display, I tried to implement this captcha component class under this article

    http://bakery.cakephp.org/articles/view/captcha-component-with-phpcaptcha

    and it seems not to be working on my side. I’m using Apacher 2.x, PHP 5.x and CakePHP 1.2alpha.

    Or is there other way to use Captcha in CakePHP 1.2alpha? or can you suggest any good implemention or tutorial about captcha?

    I really appreciate your help.

    — Wendell

  • cakebaker

    @Wendell: I don’t have any experience with Captchas, but you could try http://bakery.cakephp.org/articles/view/integrate-cakephp-with-kcaptcha

    Good luck!

  • ken

    Hello

    Not Found

    The requested URL /cake/task was not found on this server.

    I already created the controller(app/controllers/tasks_controller) and the model (app/models/task.php) for this one.

    In httpd.conf, this line below is enable.
    LoadModule rewrite_module modules/mod_rewrite.so

    Maybe I miss something out.

    Your help is greatly appreciate. Thank you very much.

    ken

  • ken

    Hello

    I’m new to CakePHP, I tried to follow the tutorial and create simple sample, It only give me this error below (like Wendell’s error):

    Not Found

    The requested URL /cake/task was not found on this server.

    I already created the controller(app/controllers/tasks_controller) and the model (app/models/task.php) for this one.

    In httpd.conf, this line below is enable.
    LoadModule rewrite_module modules/mod_rewrite.so

    Maybe I miss something out.

    Your help is greatly appreciate. Thank you very much.

    ken

  • cakebaker

    @ken: Did you set “AllowOverride All” in your httpd.conf? See also the entry about mod_rewrite in the cookbook.

    Hope this helps!

  • ken

    @cakebaker: Thank you for your response. Yes you are right, the problem is related to “AllowOverride All”. Now it Okies

  • Ross

    I am having the same problem with the Simple ACL tutorial. Other apps made with Cake work, but this one doesn’t so I am sure it’s not Mod Rewrite (also I have checked that it’s set to ‘All’

  • cakebaker

    @Ross: Difficult to say from here what causes the problem. Is the “not found” error generated by CakePHP or does it come from your webserver? Also check whether the called controller action really exists and there is not a typo.

    Hope this helps!

  • Ross

    @cakebaker: Sorry, I should have listened to all the responses telling people to check the mod rewrite. Even though I had set the rewrite in the httpd.conf file, it still wasn’t working. When I clicked on the Apache Modules of the wamp icon and switched it on there, everything worked. Now I’m a happy cake baker.

  • cakebaker

    @Ross: Good to hear it is working now :)

Bake a comment




(for code please use <code>...</code> [no escaping necessary])

© daniel hofstetter. Licensed under a Creative Commons License