Drupal Development Tools

Call to undefined function cache_get()

When debugging with Zend Studio, you may get the fatal error "Call to undefined function cache_get()" when debugging, even though your site appears just fine in the browser.

Zend Studio seems to search open files first without regard to their actual paths. In my case, I had the cache.inc file from the views module open in Zend, and Zend was loading that instead of includes/cache.inc during debugging. Simply closing the file solved the problem.

Zend Platform on an Intel Mac

Finally. After over a year, Zend has recompiled their debugging extension so it will run on Intel Macs. That's the good news. The bad news is that now it's part of their enterprise-class Zend Platform product.

Searching Drupal code

Often I find myself in the position of having to find something in the Drupal codebase. It's easy to do; from the command line:

cd drupal5
grep -rn contact .

This recursively searches the code for Drupal 5 and returns all occurrences of the word "contact", along with the filename and line number. Suppose I'm searching for the places where the contact database table is updated in Drupal. I can pipe the results into another grep:

Zend Studio 5.5 debugging on OS X via Ubuntu and Parallels

Here's how to get debugging working in Zend Studio Server 5.5 for the Mac. There is no native version of Zend Platform for OS X on Intel Macs yet, so this solution uses Ubuntu on Parallels as an interim solution.


Subscribe to RSS - Drupal Development Tools