Drupal

Using Drupal 7 with latest MAMP

in

After I updated my MacOS to 10.11.6 (El Capitan), older MAMP seemed stop working. So, I updated MAMP to the latest version, which is Version 4.1.

For the most part, it's working fine, but I noticed that one older Drupal 7 implementation stopped working. It caused White Screen of Death (WSOD). Upon investigation by adding the following code in index.php, I see that webform module is failing.

Specify php path (version) for Drush

in

I have set up drush on a shared hosting server, but one day, it suddenly stopped working. When I type drush, there's no output (just get the command prompt back).

It turns out that the default php version on the hosting server was 5.2, and for whatever reason, it doesn't contain Phar module now (not sure if it did, or something else had changed).

Running Postfix on Mac (El Capitan) with Gmail 2 step authentication

in

When testing Drupal on a local machine, it is handy to set up Postfix so that email capability can be tested.

Here's the steps, mostly from http://benjaminrojas.net/configuring-postfix-to-send-mail-from-mac-os-x-... , but modified to work with Gmail 2 step authentication.

0. Delete failed email

Drupal 8 Installation Memo

1. Download and configure the site as Drupal 7 (hostname, VirtualHost, Directory).
2. For MAMP, configure the preference to choose PHP 5.4 (or above), and disable cache.
3. Go to the site root folder from a browser.
4. Follow the instruction. A new database will be created.

Compass on Yosemite

After upgrading Lion on my MacBook Air to Yosemite, I started to see the following error when running compass.

$ compass
-bash: /usr/bin/compass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
?>

Using GD library PNG support on Mac OSX Yosemite

in

When I upgraded to my main machine to Yosemite, I've encountered a case that some images on Drupal installation doesn't generate image-style images. The status page shows that the GD library was not complied with PNG support.

The solution is to install the latest php. I followed the following page, basically to install php55 using home brew.

Installing Drush on Bluehost/Fastdomain

in

Installing Drush on the shared hosting server, such as Bluehost, is tricky. Here's what I did for Bluehost.

1. Install Composer
curl -sS https://getcomposer.org/installer | php

In my case, this created composer.phar on the home (current) directory. Moved it to ~/bin.

2. Check if composer runs

A sample migration module - importing menu from CSV

It took some time for me to write a migrate module that imports menu links from a csv file. A seemingly simple task, but there was no sample available when I googled it. So, here it is.


class mySampleMenusMigration extends Migration {
public function __construct() {
parent::__construct(MigrateGroup::getInstance('mySampleMenusMigration'));

Using Drush on Mac with MAMP

in

Just got stuck with this. When using MAMP and Drush, you need to specify the PHP path so that both use the same PHP.

http://drupal.org/node/1296594#comment-5443454

Basically, you just need to export DRUSH_PHP in .bash_profile.

export DRUSH_PHP="/Applications/MAMP/bin/php/php5.2.17/bin/php"

Run source ~/.bash_profile to take it effect.

Drupal Mobile Tools Memorandum

in

To make Mobile Tools work with mobile sub domain, there are some tricks. Say, you want to have www.example.com for the full (desktop) site, while m.example.com is for mobile.

In that scenario, set the Mobile Tools settings as follows.
- Mobile URL -> m.example.com
- Desktop URL -> www.example.com
- Enable automatic redirection -> On (checked)

Syndicate content