Oz's picture

Login Issues with Drupal 7

I recently have been developing a site that I haven't worked on in three or four weeks. After attempting login more than 5 times, I was locked out of my site, a feature unknown to Drupal 6. So how does it work? It looks at the flood table for more than 5 failed attempts. By truncating the table, you will be able to attempt to login again. But what if you can't remember your password. The days of just md5 hashing a new password into the users table are over. Now must use the .\scripts\password-hash.sh script to generate a new password.

Oz's picture

How to add Facebook like buttons to your website

If you are looking to add facebook like buttons to your website, whether it be for users to like your website or specific content on your website, Facebook offers an extremely easy way to accomplish this.
Facebook offers a variety of ways to integrate like buttons such as HTML5, XFBML, IFRAME, and URL. If you're interested, check out:


Oz's picture

How to Setup MySQL on Mac OS without MacPorts

After many unsuccessful attempts to install MySQL using MacPorts, I gave up and tried something much simpler. Go to the MySQL downloads page (http://dev.mysql.com/downloads/mysql/) and download the latest DMG (http://dev.mysql.com/downloads/mirror.php?id=408354). The DMG will come with two packages, the application and a package to make MySQL run on startup. Also install MySQL.prefPane to have a nice interface to stop/start mysql daemon. To start, just go to your system preferences and click the MySQL icon to start. And that's it, go to command line and type:


Oz's picture

Installing GearmanD on Amazon's EC2 Linux AMI Micro Instance

I have recently been using Amazon Web Services to setup an array of different servers for use with gearmand, memcached, etc. There are some dependencies but yum makes it easy to grab these and get them installed. The gearmand version below maybe out of date, so please check launchpad.net for the latest version.

Oz's picture

Node Import playing nice with Organic Groups

Out of the box the Node Import module doesn't play nice with the Organic Groups module. When trying to configure nodes to be posted into a group after the content import, two Drupal database tables are important: og_access_post and og_ancestry. The og_access_post table has two columns, nid and og_public. The og_public field should either 0 or 1 depending on whether you want the post to be public or not. The og_ancestry table also has two columns, nid and group_nid. After importing content, it is import to update these two tables with the appropriate data.

Oz's picture

Function to retrieve a content type form array

.code {
background: #ffffd0; margin: 12px 12px 12px 12px; padding: 3px 3px 3px 3px;

//$form['#field_info'] contains information about cck fields
function _cck_form_array($type) {
module_load_include('inc', 'node', 'node.pages');
global $user;
$form_state = array();
$node = array('type' => $type, 'uid' => $user->uid, 'name' => $user->name);
$form = drupal_retrieve_form($type.'_node_form',$form_state,$node);
drupal_prepare_form($type.'_node_form', $form, $form_state);
return $form;

Oz's picture

Node Import Tip

I was unable to import node reference fields that were autocomplete fields. To make this work, I had to change the node reference field to a select field. Then in the csv, use the Title of the node to import that reference. Also, when trying to import a field that is a single on/off checkbox, I wasn't able to import the on value. I kept receiving an invalid value error. To fix this I had to change the single on/off value to a regular select field.

Oz's picture

Applying Drupal Patches in Windows

Download GNU Patch Utility

Navigate to module directory you are patching.
Type "patch -p0 < path/file.patch --binary"
Without --binary you will receive the message "Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

Oz's picture

Removing orphaned actions


Use the url:

to remove orphaned actions

Oz's picture

How to setup WAMP to send emails over the Gmail smtp

This article explains how to setup WAMP to send emails over the Gmail smtp server using the PHP-function mail().

Software needed

Wamp - Download

Stunnel - Download

Sendmail - Download

Enable POP for your Gmail account
Port 465 (or 587) must be opened to the internet

Syndicate content