Sunday, January 27, 2013

Setting up WordPress 3.5.1 on 1and1 Windows/MSSQL Hosting Plan

This article gives a great breakdown on setting up WordPress on IIS with Microsoft's SQL server. I'm not sure if this is specific to 1and1's hosting setup but I did find a quirk when using version WordPress 3.5.1 version 1.1.4 of the WordPress Database Abstraction plugin.

You're likely to run into an error similar to the following.
Call to undefined function mysql_free_result() in E:\kunden\homepages\19\<your user id>\www\mysite\wp-includes\wp-db.php on line 1126
Edit the file wordpress-root-dir\wp-includes\wp-db.php look for the following code block:
if ( is_resource( $this->result ) )
  mysql_free_result( $this->result );
Comment both lines out otherwise mysql_free_result will always return an error:
//if ( is_resource( $this->result ) )
  //mysql_free_result( $this->result );
Leave everything else in the function as is, including the closing curly brace "}" on the line below.

If you encountered this error while running install.php you will need to login to the MSSQL admin panel,  delete the tables that were created by the WordPress install.php script and re-run install.php.

Wednesday, March 14, 2012

Configuring Google NoSSLSearch for Windows DNS Servers

Create a new Primary DNS Zone on your DNS server for
Add a single CNAME record with a blank alias name and “” for the FQDN for target host. The trailing dot after “com” is important.
Clear your DNS server cache by right-clicking on your server in DNS manager and selecting Clear Cache.
When your clients request, your DNS server will direct the client to instead of
Sample output from NSLOOKUP after configuring this DNS zone:

Server:  dc02.domain.local

Hope this helps.

Monday, December 19, 2011

Fun with AirPrint, Bonjour and DNS Service Discovery (dns-sd) for iOS

I'm currently working on getting AirPrint working with our installed base of printers that don't share an IP subnet with a fleet of iOS devices. For now I'm just going to post links to the source material I've gathered. Once I've figured it out, I'll come back and expand this post:

High-Level Outline:
  • Create new DNS zone (ex: bonjour.yourdomain, this domain does not have to have a public TLD. For instance, I used print.test, and will refer to the zone as print.test in this document)
  • Add new DNS zone as published search suffix in DHCP
  • Install CUPS server (I used Ubuntu Linux Server v11.10)
  • Configure a shared printer queue in CUPS for printer1 named printer1_q
  • Add an A record for CUPS server to print.test dns zone (assumes CUPS server is at
    • cups1 IN A
  • Add b._dns-sd._udp and lb._dns-sd._udp PTR record
    • b._dns-sd._udp IN PTR print.test.
    • lb._dns-sd._udp IN PTR print.test.
  • Add PTR records for printer
    • _universal._sub._ipp._tcp IN PTR printer1._printer._tcp.print.test.
    • _cups._sub._ipp._tcp IN PTR printer1._printer._tcp.print.test.
  • Add SRV records for CUPS printer queue named printer1_q on the print server
    • printer1._printer._tcp IN SRV 0 0 631 
  • Add TXT record for CUPS printer queue named printer1_q on the print server
    • printer1._printer._tcp IN TXT (
      "ty=HP Laserjet Color 4650 DN"
      "product=(GPL Ghostscript)"
      "pdl=application/octet-stream,application/pdf, application/postscript,image/jpeg ,image/png,image/urf"
      "URF=none" )
Notes on the TXT record:

  • Always set URF=none, it must be present for the record to work
  • The value from the "ty" key is displayed in the iOS printer search results as the printer name
  • The value from the "note" key is displayed under the printer name in the iOS printer search results
  • Feature descriptors are added in a key= where is T (for true) or F (for false). If a key is not specified or is blank, the value is assumed to be false. Optional keys include:
    • Duplex: enable duplex (two-sided) printing
    • Staple: can staple
    • Copies: supports printing more than one copy of a document
    • Collate: can collate (group) pages 
    • Punch: can punch
    • Bind: can bind (assume this is saddle stitch or other binding method)
    • Sort: printer includes a sorter
  • The printer-type key appears to reference bit mask data type. I have not found a description for this enumeration.
  • I have not found documentation printer-state enumeration. Most examples set this to 3
  • If your print server requires authentication, add the following literal string to the TXT record : "air=username,password"
I'm looking into the feasibility of using native IPP without CUPS in these TXT records and will update this post with what I find out.


IETF Draft: DNS-Based Service Discovery

Manually Adding DNS-SD Service Discovery Records to an Existing Name Server

Apple Developer Documentation: Bonjour Operations

Apple Support Discussion: Airprint Information and FAQ

Apple Support Discussion: Airprint in the Enterprise across subnets

Bonjour Printing Specification

Printing from the iPad without buying a new printer

AirPrint and Linux

Airprint across subnets

CUPS & AirPrint from iPhone or iPad

Automatically generate AirPrint Avahi service files for CUPS printers

AirPrint with Ubuntu 10.10