<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6102987774778013586</id><updated>2012-02-17T04:37:11.225Z</updated><category term='install'/><category term='configure'/><category term='bake'/><category term='about'/><category term='1.2.vs.1.1'/><category term='layout template'/><category term='scaffolding'/><title type='text'>Cooking with CakePHP</title><subtitle type='html'>An account of the trial-and-error exploration of CakePHP by a part-time web application developer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cookingwithcakephp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cookingwithcakephp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Raymond</name><uri>http://www.blogger.com/profile/08412477912140180160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6102987774778013586.post-7173074217273030361</id><published>2008-05-17T09:43:00.005+01:00</published><updated>2008-05-17T09:48:42.320+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='1.2.vs.1.1'/><category scheme='http://www.blogger.com/atom/ns#' term='layout template'/><title type='text'>CakePHP 1.2 .vs. 1.1 - Changes #2</title><content type='html'>Another minor difference to CakePHP in v1.2: template file extensions have changed.&lt;br /&gt;&lt;br /&gt;In v1.1, page templates had a filename extension thtml. In v1.2 it is ctp.&lt;br /&gt;&lt;br /&gt;The IBM &lt;a href="http://www-128.ibm.com/developerworks/edu/os-dw-os-php-wiki1.html"&gt;Wiki tutorial&lt;/a&gt; suggests that you play with the page template app/views/layouts/default.thtml at the end of part 1. Using CakePHP v1.2, this is app/views/layouts/default.ctp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6102987774778013586-7173074217273030361?l=cookingwithcakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingwithcakephp.blogspot.com/feeds/7173074217273030361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6102987774778013586&amp;postID=7173074217273030361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/7173074217273030361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/7173074217273030361'/><link rel='alternate' type='text/html' href='http://cookingwithcakephp.blogspot.com/2008/05/cakephp-11-vs-12-change-2.html' title='CakePHP 1.2 .vs. 1.1 - Changes #2'/><author><name>Raymond</name><uri>http://www.blogger.com/profile/08412477912140180160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6102987774778013586.post-2093026917993771179</id><published>2008-05-17T09:20:00.003+01:00</published><updated>2008-05-17T09:40:04.250+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bake'/><category scheme='http://www.blogger.com/atom/ns#' term='1.2.vs.1.1'/><category scheme='http://www.blogger.com/atom/ns#' term='scaffolding'/><title type='text'>CakePHP 1.2 .vs. 1.1 - Changes #1</title><content type='html'>Being relatively new to CakePHP, I have been working through the IBM tutorials. In particular, the &lt;a href="http://www-128.ibm.com/developerworks/edu/os-dw-os-php-wiki1.html"&gt;Wiki tutorial&lt;/a&gt; fits closely to what I want to build for my first CakePHP implementation.&lt;br /&gt;&lt;br /&gt;Part 1 of the tutorial was straightforward. This covers the basics of creating a simple set of models, views and controllers. The result is a set of web pages which display data in tables and offer add / edit / delete functionality.&lt;br /&gt;&lt;br /&gt;The tutorial is written for v1.1 of the framework. I have opted for v1.2 - so there are some differences.&lt;br /&gt;&lt;br /&gt;The first difference is in the scaffolding. CakePHP v1.1 provides a PHP script "bake.php" in the cake/scripts directory. This is an interactive process and you've got to respond to the menus to drive the scaffolding.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ &lt;span style="font-weight:bold;"&gt;php ../scripts/bake.php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Baking ...&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Name: app&lt;br /&gt;Path: ~/dev/workspace/cakephp/app&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;[M]odel&lt;br /&gt;[V]iew&lt;br /&gt;[C]ontroller&lt;br /&gt;&lt;br /&gt;What would you like to bake? (M/V/C)&lt;br /&gt;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;CakePHP v1.2 has a command script 'cake' in the cake/console directory. This can be given command-line args so that the scaffolding can be completed quickly with a few simple commands:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ &lt;span style="font-weight:bold;"&gt;../console/cake bake all users&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This then builds a model, view and controller for the named table in the database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6102987774778013586-2093026917993771179?l=cookingwithcakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingwithcakephp.blogspot.com/feeds/2093026917993771179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6102987774778013586&amp;postID=2093026917993771179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/2093026917993771179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/2093026917993771179'/><link rel='alternate' type='text/html' href='http://cookingwithcakephp.blogspot.com/2008/05/cakephp-12-vs-11-changes-1.html' title='CakePHP 1.2 .vs. 1.1 - Changes #1'/><author><name>Raymond</name><uri>http://www.blogger.com/profile/08412477912140180160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6102987774778013586.post-5513363009449822550</id><published>2008-04-22T21:21:00.005+01:00</published><updated>2008-04-22T21:39:19.779+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='configure'/><title type='text'>Installing CakePHP into a Subdirectory</title><content type='html'>CakePHP is designed to be installed into a webroot directory. The .htaccess files are pre-configured to make everything work out of the box ...&lt;br /&gt;&lt;br /&gt;... except in my setup. I have installed CakePHP into a subdirectory of my development root. This seems to confound CakePHP - which is possibly due to some Apache settings.&lt;br /&gt;&lt;br /&gt;I have my development in a subdirectory of my home: &lt;pre&gt;/home/raymond/dev/workspace&lt;/pre&gt;. My Apache configuration sets this as the root for http://localhost/dev/:&lt;br /&gt;&lt;pre&gt;Alias /dev "/home/raymond/dev/workspace&lt;br /&gt;&amp;lt;Directory "/home/raymond/dev/workspace"&amp;gt;&lt;br /&gt;    AllowOverride All&lt;br /&gt;    Order allow,deny&lt;br /&gt;    Allow from all&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I use Eclipse, so this seems to make sense. This means I can have &lt;pre&gt;/home/raymond/dev/workspace/birthclass&lt;/pre&gt; for the birthclass site development, and now: &lt;pre&gt;/home/raymond/dev/workspace/cakephp&lt;/pre&gt; for the CakePHP experiment. All fairly logical so far ...&lt;br /&gt;&lt;br /&gt;... when having followed a tutorial, all I get from Apache is:&lt;br /&gt;&lt;pre&gt;The requested URL /home/raymond/dev/workspace/cakephp/app/webroot/ was not found on this server.&lt;/pre&gt;&lt;br /&gt;After some monkeying around, I have found the trick: edit the .htaccess files. There are three: in  the CakePHP root, app and app/webroot. In each case, the RewriteBase must be defined. In my case, these are /dev/cakephp/, /dev/cakephp/app/ and /dev/cakephp/app/webroot/ respectively. So now, my cakephp/app/webroot/.htaccess file look like this:&lt;br /&gt;&lt;pre&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;br /&gt;    RewriteEngine On&lt;br /&gt;    RewriteBase /dev/cakephp/app/webroot/&lt;br /&gt;    RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;    RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]&lt;br /&gt;&amp;lt;/IfModule&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And now I have a fully functioning CakePHP setup in its own subdirectory. When I request http://localhost/dev/cakephp, I get my CakePHP application. When I request http://localhost/birthclass, I get my &lt;a href="http://birthclass.co.uk"&gt;birthclass&lt;/a&gt; application.&lt;br /&gt;&lt;br /&gt;Job done. On to the tutorials ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6102987774778013586-5513363009449822550?l=cookingwithcakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingwithcakephp.blogspot.com/feeds/5513363009449822550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6102987774778013586&amp;postID=5513363009449822550' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/5513363009449822550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/5513363009449822550'/><link rel='alternate' type='text/html' href='http://cookingwithcakephp.blogspot.com/2008/04/installing-cakephp-into-subdirectory.html' title='Installing CakePHP into a Subdirectory'/><author><name>Raymond</name><uri>http://www.blogger.com/profile/08412477912140180160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6102987774778013586.post-2037252631107228150</id><published>2008-04-22T19:11:00.001+01:00</published><updated>2008-04-22T21:38:55.996+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='about'/><title type='text'>Starting From the Beginning</title><content type='html'>This blog will document my explorations into web application development using &lt;a href="http://cakephp.org/"&gt;CakePHP&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My current hosting provides &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt; and &lt;a href="http://www.php.net/"&gt;PHP&lt;/a&gt; on a Linux platform. I can't justify the expense of a server all to myself - even a virtual one. I don't want to have to make sure my server at home is up 27*7 .. so PHP is my language.&lt;br /&gt;&lt;br /&gt;I'm fine with this: I have some experience with programming in PHP and have dabbled with &lt;a href="http://en.wikipedia.org/wiki/Mambo_%28software%29"&gt;Mambo&lt;/a&gt; (now &lt;a href="http://joomla.org/"&gt;Joomla!&lt;/a&gt;), &lt;a href="http://www.exponentcms.org/"&gt;Exponent CMS&lt;/a&gt; and &lt;a href="http://drupal.org/"&gt;Drupal&lt;/a&gt;. PHP is fairly powerful when it gets going, but is simple enough to knock up code quickly.&lt;br /&gt;&lt;br /&gt;Whilst sniffing around the web - reading up on Ruby on Rails as it happens - I stumbled upon CakePHP. I've just completed a custom CMS to back the &lt;a href="http://birthclass.co.uk"&gt;website&lt;/a&gt; I've been maintaining, so this seems an ideal time to see how CakePHP could have made the framework creation simpler.&lt;br /&gt;&lt;br /&gt;So ... watch this space.&lt;br /&gt;&lt;br /&gt;Oh, and do feel free to correct me and make suggestions!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6102987774778013586-2037252631107228150?l=cookingwithcakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingwithcakephp.blogspot.com/feeds/2037252631107228150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6102987774778013586&amp;postID=2037252631107228150' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/2037252631107228150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6102987774778013586/posts/default/2037252631107228150'/><link rel='alternate' type='text/html' href='http://cookingwithcakephp.blogspot.com/2008/04/starting-from-beginning.html' title='Starting From the Beginning'/><author><name>Raymond</name><uri>http://www.blogger.com/profile/08412477912140180160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
