Ryan Rampersad
Opinions, Thoughts and Ideas - PHP, Java and Javascript
  • Home
  • About
  • Contact
Browse: Home / CakePHP

CakePHP

CakePHP 1.3 Helper $text truncate error

By Ryan on February 22, 2010

Today I was using one of CakePHP’s helper methods, $text->truncate. It gave me these errors and I can’t say I was pleased about it. It reminded me that sometimes, functions aren’t a piece of cake.

Warning (2): array_merge() [function.array-merge]: Argument #2 is not an array [CORE/cake/libs/view/helpers/text.php, line 184]
Warning (2): extract() [function.extract]: First argument should be an [...]

Posted in PHP | Tagged CakePHP, Error, helper, PHP, truncate | Leave a response

CakePHP – 1and1 – 500 Internal Server Error

By Ryan on February 19, 2010

I recently deployed a CakePHP application to a 1and1 server. I was presented with a wonderful 500 Internal Server Error. That only means one thing: a .htaccess was messed up somewhere.
There were many places that pointed me in the right direction to fix this problem. It was definitely an annoying hitch. Seriously, there’s that [...]

Posted in PHP, Tips | Tagged 1and1, 500, CakePHP, Error, internal, server | 1 Response

Easy CakePHP Database Settings Switching

By Ryan on February 16, 2010

CakePHP does make somethings really easy, and sometimes, not so easy. I like to have a testing setting and a production setting stored in my databases.php. Your DATABASE_CONFIG object of course contains those arrays of settings. So the question is, how do you switch exactly?
It is never mentioned specifically in the documentation, but you can [...]

Posted in PHP, Tips | Tagged CakePHP, database, model, PHP, settings | Leave a response

Referenced on Wikipedia

Referenced on Wikipedia

By Ryan on November 12, 2009

I commented on The State of CakePHP just three weeks ago. Since then, it seems I’ve garnered the attention of a Wikipedia contributor. I can’t say how long this will last, but it appears that right now that the aforementioned blog post is referenced on Wikipedia. Here are some screen-shots to commemorate this joyous occasion.
I [...]

Posted in Abstract | Tagged blog, CakePHP, ryan rampersad, wikipedia | Leave a response

The State of CakePHP

By Ryan on October 23, 2009

I raised some concerns earlier this year by writing the State of the Mootools. This time around, I’m posting about changes to the development team around CakePHP.

The Lithium website is up and running. Check it out. It looks incredible.
Today, the CakePHP world has been rocked. These few short snippets from various blogs around the web [...]

Posted in PHP | Tagged CakePHP, core, developers, lithium, PHP, state | 4 Responses

Disable CakePHP SQL Log when using Ajax

By Ryan on August 24, 2009

When CakePHP debugging is set to anything above 0, you’re in development mode and it’ll append the sql log on to the end of any view. This is great for general development but if you’re trying to test your ajax functionality, you’ll get that sql log in the ajax response.
I’ve seen some solutions that have [...]

Posted in PHP | Tagged ajax, CakePHP, PHP, sql | Leave a response

How to use $javascript->codeBlock in CakePHP

By Ryan on August 22, 2009

CakePHP’s $javascript helper is useful but it can be somewhat fickle.
I wanted to throw my javascript into $scripts_for_layout so it’d be in the head of the page. That’s what codeBlock is supposed to do. It seems like you get a couple of usage options. You can write all your javascript as a string and pass it [...]

Posted in Javascript, PHP | Tagged CakePHP, Javascript, PHP | 4 Responses

Warning (512): Cache not configured properly. Please check Cache::config(); in APP/config/core.php [CORE\cake\libs\configure.php, line 663]

By Ryan on August 5, 2009

I was working with cake php recently and I came across these three errors:
Warning (512): Cache not configured properly. Please check Cache::config(); in APP/config/core.php [CORE\cake\libs\configure.php, line 663]
Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE\cake\libs\configure.php, line 684]
Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE\cake\libs\configure.php, line 691]
What could’ve caused this? What was [...]

Posted in PHP | Tagged cache, CakePHP, Error, git | 1 Response

CakePHP 1.2 released

By Ryan on December 26, 2008

CakePHP 1.2 has been released as a stable non-beta version just yesterday!
There are so many features to list there is simply no way to list them all, but as a brief overview, if you used CakePHP 1.1, this only applies to you.

Unit Testing
Plugins
Auth and Security Components
Database drivers for many databases
Powerful Debugging
Routing
And so much more

I’ve been [...]

Posted in PHP, Reviews | Tagged 1.2, CakePHP, PHP, released | 2 Responses

CakePHP Model->find conditions

By Ryan on August 25, 2008

While working on the Central News site, I had to make some more complex queries to my database to pull only the news that should be shown today. Each news post has two date fields, start_showing and end_showing. This way we can allow a particular entry to be in the news for more than a [...]

Posted in PHP | Tagged CakePHP, conditions, find, model, mysql, PHP | 4 Responses

Next »

Recent Posts

  • Create a Branch and Switch to it in Git
  • Setting Build Path has Encountered a Problem in Eclipse
  • Queue Ajax Requests in Mootools
  • CakePHP 1.3 Helper $text truncate error
  • CakePHP – 1and1 – 500 Internal Server Error

Tags

(fluff)Grabber 2.7 2009 Apple array beta blog blogs Browser Browsers CakePHP chrome CSS Design Error Firefox fluff friends fluff grabber free Google html iGoogle internet explorer Java Javascript mac Microsoft Mootools music PHP plugin plurk program review School SEO solution string tip Tips update vista Windows windows 7 Wordpress

Search

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
QC: