<?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-5959891595643291535</id><updated>2012-01-26T11:32:22.153-08:00</updated><category term='logging'/><category term='fonts'/><category term='eclipse'/><category term='pr'/><category term='installation'/><category term='dreamweaver'/><category term='debugging'/><category term='config'/><category term='ide'/><category term='programming'/><category term='errors'/><title type='text'>CakePHP Tutorials</title><subtitle type='html'>CakePHP tips - from installation to ACL, quick tips and best practice for one of the most popular PHP frameworks out there.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cake-php-tutorial.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cake-php-tutorial.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Into The Rough</name><uri>http://www.blogger.com/profile/08313167177692318993</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>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5959891595643291535.post-452350873130537222</id><published>2009-09-01T12:43:00.000-07:00</published><updated>2009-09-01T12:49:23.864-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='config'/><category scheme='http://www.blogger.com/atom/ns#' term='pr'/><title type='text'>Quick Tip: are you using pr()?</title><content type='html'>pr() is a version of print_r() with &amp;lt;pre&amp;gt; tags wrapped around it. It will echo out your array in a human-readable format - without having to view source.&lt;br /&gt;&lt;br /&gt;Why is this useful? Well, in the world of CakePHP, everything is an array and eventually you're going to have to do some debugging. Not only is pr() easier to type, it's&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Why doesn't pr() work?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Have you set debug mode to zero?&lt;br /&gt;&lt;br /&gt;Check your /app/config/core.php for this line:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;Configure::write('debug', 0);&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Change it to:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;Configure::write('debug', 2);&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And now you should get some nice debug output at the bottom of every page too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5959891595643291535-452350873130537222?l=cake-php-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cake-php-tutorial.blogspot.com/feeds/452350873130537222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/09/quick-tip-are-you-using-pr.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/452350873130537222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/452350873130537222'/><link rel='alternate' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/09/quick-tip-are-you-using-pr.html' title='Quick Tip: are you using pr()?'/><author><name>Into The Rough</name><uri>http://www.blogger.com/profile/08313167177692318993</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5959891595643291535.post-3106490277328759669</id><published>2009-08-27T02:21:00.001-07:00</published><updated>2009-08-27T02:36:20.562-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>10 great programming fonts</title><content type='html'>Programmers spend hours at their desks either working hard or just trying to look like they are. As a programmer your eyes will take a pounding and the font you use is important.&lt;br /&gt;&lt;br /&gt;You don't have to stick with the default terminal font, or whatever your IDE uses. Try some of these fonts and give your eyes a rest.&lt;br /&gt;&lt;br /&gt;Remember: bump up the font size and your eyes will thank you for it.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;h3&gt;Inconsolata - &lt;a href="http://www.levien.com/type/myfonts/inconsolata.html"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fto4W_jtG7E/SpZSMcaZ2yI/AAAAAAAAARc/kci6sZP8nrc/s1600-h/inconsolata.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 143px;" src="http://3.bp.blogspot.com/_fto4W_jtG7E/SpZSMcaZ2yI/AAAAAAAAARc/kci6sZP8nrc/s320/inconsolata.png" alt="" id="BLOGGER_PHOTO_ID_5374573579052112674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Consolas - &lt;a href="http://www.ascenderfonts.com/font/consolas-regular.aspx"&gt;download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fto4W_jtG7E/SpZR07OvrKI/AAAAAAAAAQ8/mRSlGw30nAQ/s1600-h/consolas.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 152px;" src="http://3.bp.blogspot.com/_fto4W_jtG7E/SpZR07OvrKI/AAAAAAAAAQ8/mRSlGw30nAQ/s320/consolas.png" alt="" id="BLOGGER_PHOTO_ID_5374573175007849634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Deja Vu Sans Mono - &lt;a href="http://dejavu-fonts.org/wiki/index.php?title=Main_Page"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZR9saajmI/AAAAAAAAARM/IPN6zH5airw/s1600-h/deja-vu-sans-mono.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 156px;" src="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZR9saajmI/AAAAAAAAARM/IPN6zH5airw/s320/deja-vu-sans-mono.png" alt="" id="BLOGGER_PHOTO_ID_5374573325649088098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Droid Sans Mono - &lt;a href="http://damieng.com/blog/2007/11/14/droid-font-family-courtesy-of-google-ascender"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fto4W_jtG7E/SpZSIObHuwI/AAAAAAAAARU/KBWy8qb-4F0/s1600-h/droid-sans-mono.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 155px;" src="http://4.bp.blogspot.com/_fto4W_jtG7E/SpZSIObHuwI/AAAAAAAAARU/KBWy8qb-4F0/s320/droid-sans-mono.png" alt="" id="BLOGGER_PHOTO_ID_5374573506577545986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Proggy - &lt;a href="http://www.proggyfonts.com/index.php?menu=download"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZShJDcwcI/AAAAAAAAAR8/D-xK7DGABso/s1600-h/proggy-clean.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 118px;" src="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZShJDcwcI/AAAAAAAAAR8/D-xK7DGABso/s320/proggy-clean.png" alt="" id="BLOGGER_PHOTO_ID_5374573934632812994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Monofur - &lt;a href="http://www.dafont.com/monofur.font"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fto4W_jtG7E/SpZSWns5zbI/AAAAAAAAARs/gMImNA3aXFQ/s1600-h/monofur.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 134px;" src="http://4.bp.blogspot.com/_fto4W_jtG7E/SpZSWns5zbI/AAAAAAAAARs/gMImNA3aXFQ/s320/monofur.png" alt="" id="BLOGGER_PHOTO_ID_5374573753881185714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Profont - &lt;a href="http://www.tobias-jung.de/seekingprofont/"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZSbbUbJ_I/AAAAAAAAAR0/GgcRMukvi98/s1600-h/profont.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 101px;" src="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZSbbUbJ_I/AAAAAAAAAR0/GgcRMukvi98/s320/profont.png" alt="" id="BLOGGER_PHOTO_ID_5374573836456634354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Monaco - &lt;a href="http://www.gringod.com/wp-upload/MONACO.TTF"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fto4W_jtG7E/SpZSRUlwNII/AAAAAAAAARk/5gPacJtbRmU/s1600-h/monaco.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 174px;" src="http://2.bp.blogspot.com/_fto4W_jtG7E/SpZSRUlwNII/AAAAAAAAARk/5gPacJtbRmU/s320/monaco.png" alt="" id="BLOGGER_PHOTO_ID_5374573662851576962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Andale Mono - &lt;a href="http://web.nickshanks.com/fonts/microsoft-core-web-fonts"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZRuvNKRoI/AAAAAAAAAQ0/QkTdaXdYe9c/s1600-h/andale-mono.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 149px;" src="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZRuvNKRoI/AAAAAAAAAQ0/QkTdaXdYe9c/s320/andale-mono.png" alt="" id="BLOGGER_PHOTO_ID_5374573068700763778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3&gt;Courier - &lt;a href="http://web.nickshanks.com/fonts/microsoft-core-web-fonts"&gt;download&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZR5p6CldI/AAAAAAAAARE/b6Oi_XhWGJA/s1600-h/courier-new.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 150px;" src="http://1.bp.blogspot.com/_fto4W_jtG7E/SpZR5p6CldI/AAAAAAAAARE/b6Oi_XhWGJA/s320/courier-new.png" alt="" id="BLOGGER_PHOTO_ID_5374573256256951762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5959891595643291535-3106490277328759669?l=cake-php-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cake-php-tutorial.blogspot.com/feeds/3106490277328759669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/08/10-great-programming-fonts.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/3106490277328759669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/3106490277328759669'/><link rel='alternate' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/08/10-great-programming-fonts.html' title='10 great programming fonts'/><author><name>Into The Rough</name><uri>http://www.blogger.com/profile/08313167177692318993</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_fto4W_jtG7E/SpZSMcaZ2yI/AAAAAAAAARc/kci6sZP8nrc/s72-c/inconsolata.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5959891595643291535.post-399995689096209939</id><published>2009-06-05T03:26:00.000-07:00</published><updated>2009-06-05T03:55:14.957-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='dreamweaver'/><title type='text'>Using CakePHP with your IDE</title><content type='html'>CakePHP 1.2.x uses .ctp files by default which means you will probably lose syntax highlighting in your chosen editor. CakePHP 1.1.x uses .thtml files.&lt;br /&gt;&lt;br /&gt;In this tutorial we'll show you how to set up syntax highlighting for .thtml and .ctp files.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;CakePHP and Eclipse&lt;/h3&gt;&lt;br /&gt;To set up your version of Eclipse to read either file type, follow these steps:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Go to Window &gt; Preferences &gt; General &gt; Content types&lt;/li&gt;&lt;li&gt;In the content types window navigate the tree to text &gt; PHP content type&lt;/li&gt;&lt;li&gt;Click add&lt;/li&gt;&lt;li&gt;Enter *.ctp or *.thtml depending on what version of CakePHP you use. It might be best to add both - just in case.&lt;/li&gt;&lt;li&gt;Now navigate to Editors &gt; File Associations &lt;/li&gt;&lt;li&gt;Enter *.ctp or *.thtml depending on what version of CakePHP you use.&lt;/li&gt;&lt;li&gt;Under "Associated Editors:", select the PHP Editor and click Default. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;CakePHP and Dreamweaver&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Go to your Dreamweaver installation folder (let's assume this is C:\Program Files\Adobe\Adobe Dreamweaver CS3)&lt;/li&gt;&lt;li&gt;Open the configuration folder&lt;/li&gt;&lt;li&gt;Edit extensions.txt and modify the first line so THTML and CTP are present (comma seperated. It should look something like this: ,MASTER,THTML,CTP:All Documents&lt;/li&gt;&lt;li&gt;Edit the PHP files line in the same way. It should look like this: PHP,PHP3,PHP4,PHP5,TPL,THTML,CTP:PHP Files&lt;/li&gt;&lt;li&gt;Now browse to the DocumentTypes folder and open MMDocumentTypes.xml.&lt;/li&gt;&lt;li&gt;Do a ctrl-f search for "winfileextension" and modify the line to look like this: winfileextension="php,php3,php4,php5,thtml,ctp" &lt;/li&gt;&lt;li&gt;Do the same for "macfileextension": macfileextension="php,php3,php4,php5,thtml,ctp"&lt;/li&gt;&lt;li&gt;Now go to your "Document and Settings" folder (found under your username e.g. "C:\Documents and Settings\Your User Name\Application Data\Adobe\Dreamweaver 9\Configuration"&lt;/li&gt;&lt;li&gt;Edit "Extensions.txt" and add the same lines you added to the other extensions file.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Using CakePHP with Aptana&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;From the Window menu, select Preferences..., and then choose General &gt; Editors &gt; File Associations.&lt;/li&gt;&lt;li&gt;Add the appropriate file type.&lt;/li&gt;&lt;li&gt;Next to the File Types list, click the Add button.&lt;/li&gt;&lt;li&gt;In the New File Type pop-up window, type the appropriate file extension (e.g. "&lt;em&gt;.ctp" or "&lt;/em&gt;.thtml").&lt;/li&gt;&lt;li&gt;Click OK to add the New File Type to the List.&lt;/li&gt;&lt;li&gt;Associate the new file type with Aptana.&lt;/li&gt;&lt;li&gt;On the File Types list, select the file type that you just added.&lt;/li&gt;&lt;li&gt;Next to the Editor Associations list, click the Add button.&lt;/li&gt;&lt;li&gt;On the Editor Selection pop-up window, select the editor that you want to associate with your file type.&lt;/li&gt;&lt;li&gt;Click OK to add the editor.&lt;/li&gt;&lt;li&gt;The new is now associated with the  specified file type.&lt;/li&gt;&lt;li&gt;Click OK to apply your changes and  close the Preferences window.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;CakePHP with gEdit or other Linux editors&lt;/h3&gt;&lt;br /&gt;Edit the /etc/mime.types file to point .ctp or .thtml files to the relevant editor you are using.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5959891595643291535-399995689096209939?l=cake-php-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cake-php-tutorial.blogspot.com/feeds/399995689096209939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/06/using-cakephp-with-your-ide.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/399995689096209939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/399995689096209939'/><link rel='alternate' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/06/using-cakephp-with-your-ide.html' title='Using CakePHP with your IDE'/><author><name>Into The Rough</name><uri>http://www.blogger.com/profile/08313167177692318993</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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5959891595643291535.post-7588034290198892582</id><published>2009-06-05T02:41:00.000-07:00</published><updated>2009-06-05T04:18:41.605-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Debugging with CakePHP</title><content type='html'>CakePHP comes with some handy debug functions to make your coding life easier.&lt;br /&gt;&lt;br /&gt;The first thing you should do is make sure Configure::read('debug') is set to 1 or 2. This will then allow use of debugger functions and also show database queries at the bottom of the page (very handy for profiling and finding bottlenecks).&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;print_r convenience function pr()&lt;/h3&gt;This function puts [pre] tags around the standard print_r to show the contents of an array in a well-formatted manner, making it easier to read and thus quicker to debug.&lt;br /&gt;&lt;pre&gt;&lt;span style="font-weight: bold;"&gt; function pr($var) {&lt;br /&gt;if (Configure::read() &gt; 0) {&lt;br /&gt;echo '&amp;lt;pre&amp;gt;';&lt;br /&gt;print_r($var);&lt;br /&gt;echo '&amp;lt;/pre&amp;gt;';&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;To find out information about your database table use pr($this-&gt;ModelName-&gt;schema())&lt;br /&gt;&lt;h3&gt;Why doesn't the pr() function work?&lt;br /&gt;&lt;/h3&gt;What is your debug level set to? If it's less than 1, it won't display.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;debug($var, $showHTML = false, $showFrom = true)&lt;br /&gt;&lt;/h3&gt;The debug() function is a globally available function that works similarly to the PHP function print_r(). The debug() function allows you to show the contents of a variable in a number of different ways. First, if you'd like data to be shown in an HTML-friendly way, set the second parameter to true. The function also prints out the line and file it is originating from by default.&lt;p&gt;&lt;/p&gt; &lt;p&gt;Output from this function is only shown if the core debug variable has been set to a value greater than 0.&lt;/p&gt;&lt;h3&gt;Logging with cakephp&lt;/h3&gt;&lt;p&gt;Logging your output can be useful in a number of scenarios - especially in production servers where the debug level must be set to 0. To start logging output, use the log() function.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The log() function takes two parameters. The first is the message you'd like written to the log file and the second is used to define the log type you wish to write the message to. If not supplied, it defaults to LOG_ERROR, which writes to the error log previously mentioned. You can set this second parameter to LOG_DEBUG to write your messages to an alternate debug log found at app/tmp/logs/debug.log:&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5959891595643291535-7588034290198892582?l=cake-php-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cake-php-tutorial.blogspot.com/feeds/7588034290198892582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/06/debugging-with-cakephp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/7588034290198892582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/7588034290198892582'/><link rel='alternate' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/06/debugging-with-cakephp.html' title='Debugging with CakePHP'/><author><name>Into The Rough</name><uri>http://www.blogger.com/profile/08313167177692318993</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-5959891595643291535.post-8064479641402492888</id><published>2009-06-05T02:03:00.000-07:00</published><updated>2009-06-05T02:39:14.400-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><title type='text'>CakePHP Install Checklist (Apache)</title><content type='html'>CakePHP is easy to install - extract the latest version into your web-accessible folder and you're good to go. If you don't see the default Cake page, try this checklist to see if you meet the necessary requirements for installing CakePHP on a Linux server.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Make sure you have the lastest stable release by going to http://cakeforge.org/projects/cakephp. You can download the nightly release from their SVN repository at &lt;a href="https://svn.cakephp.org/repo/trunk/cake/" title="Linkification: https://svn.cakephp.org/repo/trunk/cake/"&gt;https://svn.cakephp.org/repo/trunk/cake/&lt;/a&gt; but take care to note this is not marked as stable for production.&lt;/li&gt;&lt;li&gt;Make sure that an .htaccess override is allowed: in your httpd.conf, you should have a section that defines a section for each Directory on your server. Make sure the &lt;strong&gt;AllowOverride&lt;/strong&gt; is set to &lt;strong&gt;All&lt;/strong&gt; for the correct Directory.&lt;/li&gt;&lt;li&gt;Make sure the .htaccess files are present - your operating system may treat these as hidden files and ignore them. These are essential.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Ensure mod-rewrite is enabled. This allows for "pretty" URLS such as www.mysite.com/posts/latest-bilge rather than /posts.php?post_id=934789. To enable mod-rewrite on Ubuntu Linux use: &lt;span style="font-weight: bold;"&gt;sudo a2enmod rewrite&lt;/span&gt;&lt;/li&gt;&lt;li&gt;What directory are you running the install from? If it's from a user directory (and not the webroot) then you need to set a RewriteBase [folder name] in the root .htaccess file.&lt;/li&gt;&lt;li&gt;If you are getting infinite redirect loop errors in your browser, this will probably be a rewrite problem. However this could also be caused by ACL permission issues - by default this is off so you should know if you've got ACL enabled for your app.&lt;/li&gt;&lt;li&gt;Are your sessions not working? Are you using a custom session handler? How are you saving your sessions? By default, CakePHP will use PHP's default session handler, if for some reason you don't have permissions to write to disk, you may get an error such as "session_start() [function.session-start]: open(/var/php_sessions/&lt;br /&gt;sess_55725da39073051a9529a124c99b54df, O_RDWR) failed: No such file or&lt;br /&gt;directory (2) [CORE/cake/libs/session.php, line 539]"&lt;/li&gt;&lt;li&gt;In this instance, make sure the /var directory is writable by the apache process.&lt;/li&gt;&lt;li&gt;What version of PHP are you running? You will need version 4.3.2 or higher (CakePHP runs equally well on 4 and 5 - though there may be different bugs in each)&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Installing CakePHP On IIS&lt;br /&gt;&lt;/h2&gt;See &lt;a href="http://blogs.iis.net/tobintitus/archive/2009/04/03/installing-cakephp-on-iis-7.aspx"&gt;this&lt;/a&gt; article for detailed instructions on how to install Cake on IIS.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Installing CakePHP On Cpanel&lt;/h2&gt;See &lt;a href="http://www.cakephp.co.uk/installing_cakephp_on_cpanel_server.html"&gt;this&lt;/a&gt; article for detailed instructions on how to install Cake on Cpanel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5959891595643291535-8064479641402492888?l=cake-php-tutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cake-php-tutorial.blogspot.com/feeds/8064479641402492888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/06/cakephp-install-checklist-apache.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/8064479641402492888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5959891595643291535/posts/default/8064479641402492888'/><link rel='alternate' type='text/html' href='http://cake-php-tutorial.blogspot.com/2009/06/cakephp-install-checklist-apache.html' title='CakePHP Install Checklist (Apache)'/><author><name>Into The Rough</name><uri>http://www.blogger.com/profile/08313167177692318993</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>3</thr:total></entry></feed>
