How many nights have you sat in bed, sleepless, plagued by wonderings of why no one has ever built a CSS-based ransom note generator? One? A hundred? Countless?
I fall into the "countless" category. So, gosh darn it, I decided to do something about it.
The chicken we stole from your yard was mighty tasty.
Or maybe like this:
You should turn off your webcam more often.
I've been wasting my time looking at popurls.com pretty regularly over the last year or so, but lately I've started feeling a little... irrtiable... when I have to look at (for instance) Mr Pregnant against my will every time I scroll down the page. (The same is true for almost any youtube video that makes it to the top of the lists. While it's been educational to voluntarily expose myself to the dispiriting world of youtube popularity, I think I've learned about all I need to by now.)
Anyway. It occured to me the other day that I could reproduce a youtube-less (and truemors-less and stumbledupon-less) popurls-style blog aggregator right here and maybe never look upon Mr Pregnant again. So I did. Here it is.
Not nearly as widgety, but not bad for a few hours work. I couldn't figure out how to make the del.icio.us feed work in a way that I liked so I didn't include it.
Note: if you don't care about Drupal, PHP, or CiviCRM, you should stop reading now.
Earlier this week I installed CiviCRM on a client's Drupal site. To my chagrin, the only thing civicrm would do consistently is spew errors like this:
"Warning: Smarty error: problem creating directory ..."
After a lot of hair-pulling and swearing and crying, I found the problem. The host for the site runs PHP in safe mode. When safe mode is on, the value returned from file_exists() is unreliable.
Let's say the file path to your web site is /a/b/c/d, where folders c and d are the ones you actually have access to. Since your host runs php in safe mode, file_exists("/a") will return false, even though it's a valid directory. Same with file_exists("/a/b"), but file_exists("/a/b/c") returns true.
In the Smarty package within CiviCRM, in core.create_dir_structure.php, around line 69, file_exists() is used in this fashion, so if php is in safe mode, the function that creates all the neat template directories for civicrm will return false, spew an error, and exit, which, and I mean this very seriously, causes a little kitten to die. Every time.
I worked around this just by commenting out the line that triggers the error and the line that returns false after the error, but there must be a better way.
I couldn't find any solution to this problem by googling, so I'm hoping this will be helpful to some other sorry bastard who needs to install civicrm and has a half hour to do it.