php

Using filter_var for boolean environment variables

Submitted by charles on

Someone on my team added the following setting to check whether an environment variable was true or false:

$settings['x_menu_admin_enable'] = strtolower(getenv('X_MENU_ADMIN_ENABLE')) === 'true' ? getenv('X_MENU_ADMIN_ENABLE') : FALSE;

I find that using PHPs filter_var makes this code a bit easier to parse and only calls getenv once:

Quick Drupal setup using Acquia's DAMP stack

Submitted by charles on

Acquia have released an all in one Drupal install which includes Acquia Drupal, Apache, MySQL, PHP, PhpMyAdmin, and an Acquia Drupal Control Panel, to allow users to easily test and play around with Drupal, without having to get into the technical details of installing separate instances of Apache, MySQL, PHP etc.

Check it out here: http://acquia.com/downloads