CakePHP 2.0: AjaxHelper does not implement a link() method, it is incompatible with PaginatorHelper error message

Upgrading Nouchi.Mobi from 1.3 to 2.0, i got this error on my page and spent quite a few moments trying to debug. I narrowed it down to this call I was making: $this->helpers[‘Paginator’] = array(‘ajax’ => ‘Ajax’); This sets up Ajax pagination in CakePHP 1.3 by using the AjaxHelper class but in 2.0, this functionalityContinue reading “CakePHP 2.0: AjaxHelper does not implement a link() method, it is incompatible with PaginatorHelper error message”

CakePHP: Permission denied error when trying to execute cake console command

I run both CakePHP 1.3 and 2.0 for my side projects and wanted to be able to use both console executables in my Ubuntu 11.10 dev box; I set up my aliases in my .bashrc file to point for: Cake 1.3: alias cake=”<CAKE_FOLDER>/cake/console/cake” Cake 2.1: alias cake2=”<CAKE_2_1_FOLDER>/app/Console/cake2″ and added the paths to the console foldersContinue reading “CakePHP: Permission denied error when trying to execute cake console command”

Infinite redirect loop when using CakePHP

You will sometimes run into this issue when using CakePHP, I did  a few times, and randomly or so it seemed and the reason is in my case, and I want to bet in most cases, is that you are using the Auth Component, and added a new action to your controller, and simply forgotContinue reading “Infinite redirect loop when using CakePHP”

Speed up your CakePHP application by using Memcached

In anticipation of heavier traffic and also just for performance reasons, I’ve started looking into ways of caching data for Nouchi.Mobi. Since this is a CakePHP application, I naturally looked into PHP cache based solutions and you’d be hard pressed not be recommended Memcached(Used by Facebook, Twitter, Youtube, Flicker amongst others). Why would you wantContinue reading “Speed up your CakePHP application by using Memcached”

Time localization in CakePHP

It turns out localization is not such an obvious task. I am currently trying to localize my Nouchi.Mobi app built with CakePHP and although CakePHP i18n console shell is helpful in created POT files, there still remains the question of translating time strings in French when using for example the CakePHP timeAgoInWords() or the PHPContinue reading “Time localization in CakePHP”

CakePHP Facebook Plugin: API Error Description: The specified URL is not owned by the application.

During the development of Nouchi.Mobi where i use this quite useful Facebook plugin (get it, it’s the best!), i ran into an issue trying to authenticate my localhost server against my Facebook app settings. I’vre created a virtual host entry in Apache pointing to my local project folder, edited my /etc/hosts file with a newContinue reading “CakePHP Facebook Plugin: API Error Description: The specified URL is not owned by the application.”

Set up JSON action output in CakePHP 1.3

Working  on setting up the Rest Plugin for CakePHP helped me realize that i wanted to set up JSON output for some of my actions. This way, if you request for example “www.yourapp.com/app/post/view/1.json” in the url, you will be returned the JSON post data. This excellent tutorial here will help you achieve it. The stepsContinue reading “Set up JSON action output in CakePHP 1.3”

Programming: “It pays the bills” vs “It satisfies me”

At this point in my career I find myself increasingly frustrated with my day to day work. You see, living in the DMV area (DC-MD-VA), a lot of the jobs available are in government contracting and as many will tell you, those are well paying jobs with a certain level of job security added. ForContinue reading “Programming: “It pays the bills” vs “It satisfies me””

Mysql: Remove Duplicate Values on Creating A New Table

I had a reference table for all of the World Countries that i wanted to extract Currency data from to another new table. I initially use this code which created a new table with 263 records. CREATE TABLE currencies SELECT tld, currency, currencycode FROM countries ; I quickly realized that for the purpose I wasContinue reading “Mysql: Remove Duplicate Values on Creating A New Table”

Using the CakePHP 1.2 Email component

I was following the documentation at http://book.cakephp.org/view/269/Sending-a-basic-message about sending an email with CakePHP using the Email component, used the sample code they provided but could not get my application to send email. A little bit of googling helped me figure out what was going on. I have CakePHP setup within my XAMPP htdocs directory andContinue reading “Using the CakePHP 1.2 Email component”