Cook up websites fast with CakePHP, part 2

Published on December 13, 2006 and tagged with acl  bake  cakephp  tutorial

On IBM’s developerWorks the second part (requires a free IBM id) of the series “Cook up websites fast with CakePHP” has been published. It covers scaffolding, the bake script and ACL:

This tutorial shows you how to jumpstart your CakePHP application using scaffolding and Bake. You will also learn the ins and outs of using CakePHP’s Access Control Lists (ACLs). You’ll get a look at what scaffolding is and what it provides. Then you’ll learn how to use Bake to generate the code for a scaffold, letting you tweak it as you go. Finally, you will learn about ACLs: what they are, how to create them, and how to use them in your application.

Like the first part it is a comprehensive and good tutorial. You can also download it as a PDF (without registration).

See also part 1 (PDF)

14 comments baked

  • Dieter@be December 13, 2006 at 22:18

    I don’t have much time right now but i’ve just browsed it a bit and wow! what a resource! pretty in-depth and on first look, and it looks like it contains great explications about the very-hard-to-understand/find-good-resources-about subject ACL.

    Dieter

  • Mandy December 14, 2006 at 08:35

    This is great! I love the attention cakephp is getting :)

  • Luke Mackenzie January 28, 2007 at 10:08

    The tutorial is out of date. For example in part 2, acl.php does not behave as described. Has anyone got this working in cake 1.1.11.4064?

  • cakebaker January 28, 2007 at 12:21

    @Luke: Well, the tutorial was written with CakePHP 1.1.8, so it is possible that some details have changed since then. But in general it should still be valid. What is the problem?

  • Luke Mackenzie January 28, 2007 at 17:22

    basically, acl.php seems to have changed so that you need to add an extra parameter to get it to work, and using ‘null’ doesn’t work. I figured it out in the end. It might also be worth looking at the acl_admin project instead of using acl.php.

  • Eugene February 28, 2007 at 18:32

    I have some troubles with baking in this tutorial (or with cakephp) – I get a fatal error: call to undefined function mysql_connect() in … dbo_mysql.php on line 102
    I’m new to cakephp – could anyone suggest what is wrong?

  • cakebaker February 28, 2007 at 20:10

    @Eugene: Sounds like the MySQL extension is not loaded in the command line version of PHP. Afaik you have to load it in the php.ini used for the cli version of PHP.

    HTH

  • Eugene March 01, 2007 at 16:05

    @HTH: Thanks. Cakephp seems to be what I was looking for! Is there a nice forum where I can ask people some questions about it?

  • cakebaker March 01, 2007 at 17:19

    @Eugene: There is no forum, but you can ask your questions in the CakePHP google group (http://groups.google.com/group/cake-php) or in the IRC channel #cakephp on freenode.net

  • gokhan September 09, 2007 at 05:16

    @Luke Mackenzie why didn’t you tell that extra parameter in your post :(

  • gokhan September 09, 2007 at 05:23

    ok i found it’s just ”

  • integrator June 28, 2008 at 23:14

    I have some troubles with baking in this tutorial (or with cakephp) – I get a fatal error: call to undefined function mysql_connect() in … dbo_mysql.php on line 111.
    I am using mamp on leopard, but when baking from the console the mac uses the standard php installed, not the one from MAMP. Somehow I have to change the path to the MAMP php version??

  • integrator June 29, 2008 at 01:19

    I found the solution to bake with MAMP on mac osx leopard:
    To see the php program the console uses type: which php
    If it is not the MAMP version, create a .bash_profile file in your user home directory with the following lines:
    PATH=/Applications/MAMP/bin/php5/bin:$PATH
    export DYLD_LIBRARY_PATH=/Applications/MAMP/Library/lib:${DYLD_LIBRARY_PATH}

    The first line tells the console first to look in the MAMP directory for commands. I would prefer to just tell it to look there for php but I don’t know how.
    The second line is taken from “http://www.karlkatzke.com/symfony-and-mamp-17″
    Hope this helps some mac developers.

  • cakebaker June 29, 2008 at 15:56

    @integrator: I’m glad you found a solution for this issue. Happy baking!

Bake a comment




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

© daniel hofstetter. Licensed under a Creative Commons License