Unified content_profile and user page

When you install content_profile, out of the box you have two user profile pages: (1) the drupal core user page (/user/%), and (2) the content-profile node pages (node/%).  These pages don't provide exactly the same information (there's some overlap), which ends up confusing users when they're viewing user profiles.

  Read more »

Proper folder permissions: Drupal & Ubuntu

For some reason, I can't find D.O documentation on the proper folder permissions for Drupal on Linux. So for those of you a-searchin', here's my setup:

Edit: the handbook page is (from comment), so go there to see alternatives and discussion.

cd /var/www

# u=rwx,g=rx for security
sudo chown -R {username}:www-data .
sudo chmod -R 750 .

# Let apache write to sites/{sitename}/files directories
find . -type d -wholename "*/sites/*/files" -exec sudo chmod -R 770 {} \;

# Make sure newly-created files retain the www-data group (useful for Drush)
# You don't want to apply this to files, only directories.  Hence the round-about method
sudo chmod g+s .
find . -type d -exec sudo chmod g+s {} \;

Save the World With Firefox: Charity Extensions

Long ago a project was born called SETI@home. The idea was to donate your unused CPU cycles to help calculate things that were too big for a handful of supercomputers. It was funny & cool, helping search for extra-terrestrial life.  Then the project became generalized into BOINC, enabling the development of all sorts of very important and serious volunteer distributed computing projects. Read more »

Installing apachesolr.module on Ubuntu 10.04

Ubuntu 10.04 (Lucid Lynx) just made installing the Apache Solr module for Drupal sooooo much easier. This setup won't work for Ubuntu 9.10 (Karmic Koala), because the aptitude install bit only works for tomcat5.5. If you're on 9.10, check out Nick Veenhof's article. Otherwise, enjoy! Read more »

my.cnf order-of-precedence

I'm a MAMP guy -- it' just easy. Recently I went down a rabbit hole trying to install Apache/MySQL/PHP via MacPorts, broke everything, and tossed in the towel. However, when I tried to revert back to MAMP, I kept getting the following error:

>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)

A peek into /Applications/MAMP/Library/my.cnf showed socket = /Applications/MAMP/tmp/mysql/mysql.sock, so everything should have been working! Read more »

Phusion Passenger & RJB

I have a Rails app using RJB that works find in WEBrick/Mongrel; however, when I deploy the app on Phusion Passenger, it either gets stuck loading or spits out the following error:

/app/vendor/plugins/pdf-stamper/lib/pdf/stamper.rb:41: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
[Tue Mar 30 16:05:54 2010] [error] [client] Premature end of script headers: fillpdf
[ pid=5007 file=ext/apache2/Hooks.cpp:684 time=2010-03-30 16:05:54.678 ]:
  The backend application (process 5015) did not send a valid HTTP response; instead, it sent nothing at all. It is possible that it has crashed; please check whether there are crashing bugs in this application.
Read more »

Snow leopard tarball-uploading issues

Here's the scenario:

  1. Create a tarball on your Mac (of a .git repo in my case) [ex, $tar czf repo.tgz repo.git]
  2. scp that up to your server running Linux [ex, $scp repo.tgz]
  3. extract the tarball on your server [ex, $tar xzf repo.tgz

And you're barraged with a bunch of the following:

tar: Ignoring unknown extended header keyword `'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
Read more »

Tomcat 6 on Dreamhost

A short while ago, it was impossible to run Tomcat on Dreamhost PS. It was a bummer, since I needed to deploy my FillPDF servlet (which uses Grails and iText) and I would have preferred to use my favorite hosting service. (A note to people trying every which way to deploy iText on Dreamhost -- don't bother with RJB or PHP/Java bridge on the shared plans -- it just doesn't work). Read more »

Need to test your mobile Web site?

Here's a pretty good Web site to test your site in for mobile development. The application emulates different cell phone browsers and allows you to view how it would look. It will also test your site to see how mobile ready your site is.

The site is called mobiReady

Determine if current page is a panel (Drupal themes)

Snippet that adds "panels" to the body classes of a page if the currently-viewed page is a panel:

function zen_preprocess_page(&$vars, $hook) {
  $vars['body_classes_array'][] = (module_exists('page_manager') && (page_manager_get_current_page())) ? 'panels' : ''; // Page is Panels page
//  $vars['sample_variable'] = t('Lorem ipsum.');

Syndicate content