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 www.google.com.
Add a single CNAME record with a blank alias name and “nosslsearch.google.com.” for the FQDN for target host. The trailing dot after “com” is important.
Google NOSSLSEARCH
Clear your DNS server cache by right-clicking on your server in DNS manager and selecting Clear Cache.
When your clients request www.google.com, your DNS server will direct the client to nosslsearch.google.com instead of www.l.google.com.
Sample output from NSLOOKUP after configuring this DNS zone:

C:\Windows\system32>nslookup www.google.com
Server:  dc02.domain.local
Address:  10.254.1.2

Name:    nosslsearch.google.com
Address:  216.239.32.20
Aliases:  www.google.com
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 10.0.0.10
    • cups1 IN A 10.0.0.10
  • 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 (
      "txtvers=1"
      "qtotl=1"
      "rp=printers/printer1_q"
      "adminurl=http://cups1.print.test:631/printers/printer1_q"
      "ty=HP Laserjet Color 4650 DN"
      "product=(GPL Ghostscript)"
      "transparent=t"
      "copies=t"
      "duplex=t"
      "color=t"
      "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.

Sources:

IETF Draft: DNS-Based Service Discovery 
http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt

Manually Adding DNS-SD Service Discovery Records to an Existing Name Server
http://www.dns-sd.org/ServerStaticSetup.html

Apple Developer Documentation: Bonjour Operations
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NetServices/Articles/NetServicesArchitecture.html#//apple_ref/doc/uid/20001074-SW1

Apple Support Discussion: Airprint Information and FAQ
https://discussions.apple.com/thread/2658560?start=15&tstart=0


Apple Support Discussion: Airprint in the Enterprise across subnets
https://discussions.apple.com/thread/2751128?start=0&tstart=0

Bonjour Printing Specification
http://devimages.apple.com/opensource/BonjourPrinting.pdf

Printing from the iPad without buying a new printer
http://jcostom.wordpress.com/2011/03/16/printing-from-the-ipad-without-buying-a-new-printer/

AirPrint and Linux
http://www.finnie.org/2010/11/13/airprint-and-linux/

Airprint across subnets
https://sites.google.com/site/iwastepaper/

CUPS & AirPrint from iPhone or iPad
http://element.edoceo.com/howto/cups-airprint

Automatically generate AirPrint Avahi service files for CUPS printers
http://atxconsulting.com/blog/tjfontaine/2010/11/21/automatically-generate-airprint-avahi-service-files-cups-printers

AirPrint with Ubuntu 10.10
http://hartlessbydesign.com/blog/view/197-airprint-with-ubuntu-1010