Drupal on Cover of Information Week
Look what's on the cover of the November 17, 2008 issue of Information Week! Drupal is mentioned several times throughout their series on open source.
Interviewed
Hey, I got interviewed by OStatic about Pro Drupal Development, Second Edition. I mention giant bunnies in the interview.
ImageMagick, MacPorts and MAMP
After installing ImageMagick from MacPorts, I ran into the following error in my MAMP Apache error log when trying to run PHP code that resized images:
Symbol not found: __cg_jpeg_resync_to_restart
To solve this, edit /Applications/MAMP/Library/bin/envvars to read:
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_FALLBACK_LIBRARY_PATH=/Applications/MAMP/Library/lib
What Pro Drupal Development is, and What it Is Not
As copies of Pro Drupal Development, Second Edition hit the streets, I'd like to take a moment to clarify what the book is and what it is not.
What it is not
- A complete and comprehensive guide to using MySQL with Drupal
- A detailed howto on integrating Drupal with Sphinx
- The ultimate reference on using jQuery/AJAX/JavaScript with Drupal
- A step-by-step tutorial on building an ecommerce site with Drupal
- ...
What it is
The target audience of Pro Drupal Development is smart people who know PHP (or other languages; PHP can be picked up pretty easily) and are looking for an overview of how Drupal core works. It achieves this by walking through Drupal's major systems: users, nodes, filters, triggers, themes, etc. One of the challenges in writing the book was knowing when to stop. Take theming, for example. To do justice to Drupal's theming system would take a 400-page book in itself. The same goes for working with multimedia files, or optimization, or jQuery. The idea of Pro Drupal Development is to lay down the basics in each of these areas so that the reader is oriented and can then go on to use other resources, or to just better understand the code itself. Other books are being written that will provide great detail in specific areas, and I'm glad to see that -- it's a sign that Drupal is maturing and becoming well-known enough that there is a demand.
Pro Drupal Development was written to provide an on-ramp for intelligent people starting with Drupal so they can avoid months of feeling dumb in irc or having to piece together the big picture from a blog post here, a doc page there, a README here (that's the way I learned Drupal, and it's a frustrating way to learn). If the book fulfills this goal (and from my conversations with new developers it has) then I am satisfied.
When you find errors in the book, please post them as errata so that others can benefit. I'd recommend that when you get the book, go through the errata and make notes in the margins so that when you use the book for reference, you'll see the corrections. With the first edition, we were able to correct a lot of the errors in the second and third printings.
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.
Pro Drupal Development, Second Edition arrives
The author's copies of Pro Drupal Development, Second Edition arrived today. At 667 pages, the book is significantly thicker than the first edition!
I worked on this edition from November of 2007 to July 2008 pretty much without stopping. One morning my daughter found me in the living room writing a chapter at 3 am. It is difficult to express how much work this book has been, and how happy I am to hold the printed copy in my hands. Those who have written books will understand. :) I am glad to finally have it get into the hands of Drupal developers everywhere, and I hope that this contribution helps to complete the transition from Drupal 5 to Drupal 6. Thanks so much to all who have helped with this project!




Profits from the book go to this little guy's college fund. (And if you buy it through drupalbook.com, the Drupal Association gets a percentage of each sale.)
Installing APC on RHEL5
Here's how to install APC on RHEL5.
# yum install php-pear php-devel httpd-devel
# pecl install apc
# echo "extension=apc.so" > /etc/php.d/apc.ini
# service httpd restart
Check for the apc section in your phpinfo() page. If it's not there:
# tail /var/log/httpd/error_log
[Tue Aug 12 15:43:59 2008] [notice] Digest: done
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/apc.so' - /usr/lib/php/modules/apc.so: cannot open shared object file: Permission denied in Unknown on line 0
SELinux is preventing the extension from loading, I'll bet. Let's check:
# tail /var/log/messages
Aug 12 15:42:40 mybox yum: Installed: httpd-devel - 2.2.3-11.el5_1.3.i386
Aug 12 15:44:01 mybox setroubleshoot: SELinux is preventing the httpd from using potentially mislabeled files (./apc.so). For complete SELinux messages. run sealert -l 9e4bbfa8-327b-4bb2-94df-f154045a1ef1
Let's view the security contexts for our PHP extensions:
# ls -Z /usr/lib/php/modules
-rwxr-xr-x root root root:object_r:tmp_t apc.so
-rwxr-xr-x root root system_u:object_r:textrel_shlib_t dbase.so
-rwxr-xr-x root root system_u:object_r:textrel_shlib_t gd.so
...
Yup. Notice how the security context is missing (it's tmp_t for apc.so). Let's fix that.
# restorecon /usr/lib/php/modules/apc.so
]# ls -Z /usr/lib/php/modules
-rwxr-xr-x root root system_u:object_r:textrel_shlib_t apc.so
-rwxr-xr-x root root system_u:object_r:textrel_shlib_t dbase.so
Go ahead and ignore
Hmm, I think I will go ahead and click Ignore...

Second edition progress
I thought I'd update everyone on the progress of the second edition of Pro Drupal Development.
The second edition will cover Drupal 6, and is expanded to cover new core topics like actions, triggers, AHAH, etc.
Workflow 5.x-2.0 released
I've finally got a project that uses the workflow module so I've been able to justify putting some time into it. As a result, I've released version 5.x-2.0. This version of workflow works with the 5.x-2.x version of actions, which is the backport of Drupal-6-style actions to Drupal 5.


