If you have a multi-site Drupal 7 install, or simply another database living alongside your Drupal database, sometimes you may want to pull a few records from the other database for display on your Drupal site. Displaying data from the Drupal database is pretty easy since you can just use Drupal’s built-in db_query function: (If […]
Tag: Drupal
Drupal Installation and Performance
These are some notes on Drupal installation and performance on Unix-like operating systems (using Ubuntu here). Drupal Installation Install MySQL and create the database and Drupal database user first. If you must use apt or yum to install Drupal, don’t try to install everything at once. If you can avoid it, don’t install Drupal from […]
Fixes for Drupal Webform
I was seeing a couple of errors in the Drupal Webform module, and this page describes the fixes I used to eliminate them. This applies to version 3.x so if you’ve upgraded to 4 I doubt this is relevant anymore. As described at http://drupal.org/node/1462986. To fix this I found #webform_component in the theme_webform_display_select() function in […]
Drupal Development
Notes on Drupal development using Devel and some of its children. Install and Enable the Devel Module Devel can be downloaded from Drupal.org or by using the drush pm-download devel/drush pm-enable devel commands. Drupal Development with Devel Among other things, devel allows you to see inside the Drupal objects and arrays containing the different properties […]
Using Drush
This is quick overview of using Drush, or the Drupal shell, for updating and managing Drupal web sites. Attempting to administer Drupal through its GUI is a pain, but Drush allows you to run updates and alter your configuration quickly on the command line. Best of all, Drush is fully scriptable and provides its own […]
Installing Drush
PHP Composer provides an easier way to install Drush than the method below. Instructions for this can be found in the Drush 8/Drupal 8 version of this article, available here. After installing Composer, run the command php composer.phar global require drush/drush:7.* to install Drush 7. Procedures for installing Drush on Linux-like machines. The easiest method […]
Nginx + PHP-FPM + PHP Cache + SSL + Varnish + Drupal
Note: The below instructions are for Varnish 3 on Ubuntu 12. If you want to run Drupal with Varnish 4 on Ubuntu 16, updated instructions are here. So, you want to set up Nginx and Drupal with all the bells and whistles on Ubuntu Server 12.04. You want caching for both PHP and Varnish and […]
Drupal 7 File Descriptions
I needed to increase the maximum length of the Drupal 7 file description field that appears when you enable the File module and allow uploads in nodes. By default, the file description field restricts input to 128 characters. The Drupal 7 File Description Field This is set in file.field.inc in the File module in core […]