<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-36088674</id><updated>2009-10-03T10:04:52.580-07:00</updated><title type='text'>Little Fixes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-36088674.post-6802752782300787768</id><published>2009-05-02T21:16:00.000-07:00</published><updated>2009-09-28T22:16:29.860-07:00</updated><title type='text'>Sleepless MacBooks</title><content type='html'>My MacBook, like many people's, is an insomniac. If you put it to sleep, from the menu or by closing the shell, it wakes up again, in a few seconds. This default behavior will empty your batteries and overheat your machine in its case.&lt;br /&gt;&lt;br /&gt;Now, many things &lt;span style="font-style:italic;"&gt;can&lt;/span&gt; cause this: mostly hardware interrupt handlers containing instructions to wake up. I first Googled this problem with the phrase: &lt;span style="font-style:italic;"&gt;macbook does not stay asleep&lt;/span&gt;, but the Apple discussion board is completely disorganized. At the top of the page, it announces "1 solution" but doesn't give you a hint as to where it may be, in pages of discussion! I found it eventually, but I thought it would be helpful just to say:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;... turn off Bluetooth.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;It's in Systems Preferences under Hardware -&gt; Bluetooth. Your computer will then get the rest it needs, without pills.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Addendum:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the Bluetooth hardware is failing, the Bluetooth symbol has a little squiggle through it. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_d3u4MHOJotc/SsGXsZiAcgI/AAAAAAAAANI/c7CYjf80rOs/s1600-h/Picture+20.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 107px; height: 19px;" src="http://1.bp.blogspot.com/_d3u4MHOJotc/SsGXsZiAcgI/AAAAAAAAANI/c7CYjf80rOs/s320/Picture+20.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5386753418335384066" /&gt;&lt;/a&gt;&lt;br /&gt;This makes the system write a hardware error to the system log (/var/log/system.log) every second. This wakes your Macbook consistently.&lt;br /&gt;&lt;br /&gt;In this case, without repairing the hardware, you'll need to put your machine into hibernation, instead of sleep. There's a useful widget for this, called &lt;a href="http://www.apple.com/downloads/dashboard/status/deepsleep.html"&gt;Deep Sleep&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Your Bluetooth hardware may start working again. Anytime you see the grayed out Bluetooth symbol in the upper right, without a squiggle, you'll be able to sleep normally ... if you turn Bluetooth off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-6802752782300787768?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/6802752782300787768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=6802752782300787768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/6802752782300787768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/6802752782300787768'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2009/05/sleepless-macbooks.html' title='Sleepless MacBooks'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_d3u4MHOJotc/SsGXsZiAcgI/AAAAAAAAANI/c7CYjf80rOs/s72-c/Picture+20.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-1890779239305969722</id><published>2008-06-29T12:04:00.000-07:00</published><updated>2008-06-29T12:48:32.935-07:00</updated><title type='text'>Open Source OCR on a Mac</title><content type='html'>&lt;a href="http://code.google.com/p/tesseract-ocr/"&gt;Tesseract-OCR&lt;/a&gt; is an effective open source project from the mid-1990's. The actual character recognition is terrific, so it's not hard to get good results, and it's quite a time-saver. &lt;br /&gt;&lt;br /&gt;But, it's not exactly turn-key. You need to:&lt;br /&gt;&lt;br /&gt;1. download the source&lt;br /&gt;2. compile it for a Mac&lt;br /&gt;3. download a language file&lt;br /&gt;4. copy it to the appropriate directory&lt;br /&gt;5. run it on TIFF files that need to be renamed to a .tif extension.&lt;br /&gt;&lt;br /&gt;Tesseract won't run unless you copy the language file to /usr/local/share/tessdata. Which is strange, because it uses it very irregularly. Most of the miss-read results are simple English words: you get "iist" instead of "list", "lf" instead of "if". It makes you wonder how exactly it is applying this language file.&lt;br /&gt;&lt;br /&gt;If you use a Mac utility like Textedit, or Word, or Open Office, the spell-checker can find and help you fix these in a matter of moments. But, still, it's irritating, when you have a long document. This software needs to be 'productized'.&lt;br /&gt;&lt;br /&gt;So, the actual sequence:&lt;br /&gt;&lt;br /&gt;1. go &lt;a href="http://code.google.com/p/tesseract-ocr/"&gt;here&lt;/a&gt;, and &lt;a href="http://tesseract-ocr.googlecode.com/files/tesseract-2.03.tar.gz"&gt;download tesseract-2.03.tar.gz&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;2. In a Terminal window (Applications-&gt;Utilities), find your download directory, &lt;span style="font-weight:bold;"&gt;cd&lt;/span&gt; there, and:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;: gunzip  tesseract-2.03.tar.gz&lt;br /&gt;: tar xvf tesseract-2.03.tar&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-weight:bold;"&gt;cd&lt;/span&gt; to the &lt;span style="font-weight:bold;"&gt;tesseract-2.03&lt;/span&gt; directory, then:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;:./configure&lt;br /&gt;:sudo make&lt;br /&gt;:sudo make install&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;4. Go back &lt;a href="http://code.google.com/p/tesseract-ocr/"&gt;here&lt;/a&gt;, and &lt;a href="http://tesseract-ocr.googlecode.com/files/tesseract-2.00.eng.tar.gz"&gt;download tesseract-2.00.eng.tar.gz&lt;/a&gt;, then, find your download directory, and:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;: gunzip tesseract-2.00.eng.tar.gz &lt;br /&gt;: tar xvf tesseract-2.00.eng.tar&lt;br /&gt;: cd tessdata&lt;br /&gt;: sudo bash&lt;br /&gt;: cp * /usr/local/share/tessdata/&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then hit control-d to exit the sudo bash shell.&lt;br /&gt;&lt;br /&gt;Make a TIFF file, be sure it has a .tif extension, and then issue a command like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;tesseract document-image.tif document-results&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;... and then you'll have text in &lt;span style="font-weight:bold;"&gt;document-results.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Works great. It &lt;span style="font-style:italic;"&gt;should&lt;/span&gt; come standard with a Mac. With a graphic user interface. And some corrections to the language file use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-1890779239305969722?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/1890779239305969722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=1890779239305969722' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/1890779239305969722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/1890779239305969722'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2008/06/open-source-ocr-on-mac.html' title='Open Source OCR on a Mac'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-2317881016147945743</id><published>2008-06-15T11:56:00.000-07:00</published><updated>2008-06-15T12:33:08.245-07:00</updated><title type='text'>Server heartbeat script</title><content type='html'>Simple &lt;span style="font-weight:bold;"&gt;bash&lt;/span&gt; script on Gnu/Linux or Unix system, to monitor the uptime of your server, and tell you, call you (well, text your cell phone) when something's wrong. I just call this one &lt;span style="font-weight:bold;"&gt;heartbeat&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;#! /bin/sh -v&lt;br /&gt;while true&lt;br /&gt;do&lt;br /&gt;  if wget --no-dns-cache --no-proxy --delete-after google.com&lt;br /&gt;  then&lt;br /&gt;      if wget --no-dns-cache --no-proxy -t 1 -T 60 --delete-after \&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;your.domain's.IP.address&lt;/span&gt;/beat.php&lt;br /&gt;      then&lt;br /&gt;        echo "success"&lt;br /&gt;      else&lt;br /&gt;        echo "Heartbeat stopped" | mail -s "MACHINE DOWN" -c \&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;your@emailaddress.com&lt;/span&gt; \&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;yourphonenumber@txt.att.net&lt;/span&gt;; sleep 20m&lt;br /&gt;      fi&lt;br /&gt;  fi&lt;br /&gt;  sleep 10m&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;We need a server-side script ... the beat.php above:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1&lt;br /&gt;header("Expires: Mon, 26 Jul 1997 01:00:00 GMT"); // Date in the past&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" &lt;br /&gt;"http://www.w3.org/TR/html4/loose.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&gt;Beat&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;? print(Date("l F d, Y ... g:i A")); ?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;A few explanations:&lt;br /&gt;&lt;br /&gt;* We hit &lt;span style="font-weight:bold;"&gt;Google&lt;/span&gt; first just to make sure the web is working. No sense queueing up an unecessary e-mail to yourself.&lt;br /&gt;&lt;br /&gt;* wget's &lt;span style="font-weight:bold;"&gt;delete-after&lt;/span&gt; cleans up the result of the wget, which is built to fetch pages from a URL.&lt;br /&gt;&lt;br /&gt;* wget doesn't error when your local &lt;span style="font-weight:bold;"&gt;resolv&lt;/span&gt; cannot find a domain name. This is why we use the IP address. If you need to test to see if your domain's zone name server is running, create a script for that purpose. Don't rely on this one. &lt;br /&gt;&lt;br /&gt;* most cell phone have a way to receive e-mail / text messages. Try sending a message from your phone to your e-mail address, and reply to it, to discover, and test, your cell phone's e-mail address. &lt;br /&gt;&lt;br /&gt;* Of course, all the "cache expire" stuff, and the fresh-content dynamic server side script, is necessary, otherwise when your server goes down, some helpful cache server along the way will provide you with the beat.php results anyway, from your numerous previous wgets. It's best to test this, despite my precautions ... there are lots of cache mechanisms being inserted on the web these days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-2317881016147945743?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/2317881016147945743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=2317881016147945743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/2317881016147945743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/2317881016147945743'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2008/06/server-heartbeat-script.html' title='Server heartbeat script'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-9175539818325053479</id><published>2008-05-23T14:37:00.000-07:00</published><updated>2008-05-23T14:44:46.223-07:00</updated><title type='text'>Ubuntu command line mail</title><content type='html'>Ubuntu doesn't come pre-packaged with command line &lt;span style="font-weight:bold;"&gt;mail&lt;/span&gt;. That's strange, because this is one of the most simple, important commands in Linux / Unix admin network scripting. It lets you interact with the real world.&lt;br /&gt;&lt;br /&gt;To install, unfortunately, the older package &lt;span style="font-weight:bold;"&gt;mailutils&lt;/span&gt; is &lt;span style="font-weight:bold;"&gt;deprecated&lt;/span&gt; for Ubuntu, even though it's listed in all Google results for [ "command line mail" ubuntu ].&lt;br /&gt;&lt;br /&gt;So, installing good old unix command line &lt;span style="font-weight:bold;"&gt;mail&lt;/span&gt; (e-mail) on Ubuntu, as of late May 2008:&lt;br /&gt;&lt;br /&gt;apt-get update&lt;br /&gt;apt-get install postfix&lt;br /&gt;apt-get install mailx&lt;br /&gt;&lt;br /&gt;Then use &lt;span style="font-weight:bold;"&gt;mail&lt;/span&gt; freely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-9175539818325053479?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/9175539818325053479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=9175539818325053479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/9175539818325053479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/9175539818325053479'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2008/05/ubuntu-command-line-mail.html' title='Ubuntu command line mail'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-3238340011985325474</id><published>2008-03-18T23:58:00.000-07:00</published><updated>2008-03-19T00:04:07.495-07:00</updated><title type='text'>Safari form spacing problem</title><content type='html'>Safari will render a form with extra space at the bottom (typically, right under your submit button), whereas more compliant browsers like Firefox do not. This makes login boxes and other colored form divs and tables render improperly.&lt;br /&gt;&lt;br /&gt;The fix is simple ... add this to your opening form tag:&lt;br /&gt;&lt;br /&gt;form style="margin: 0px; padding: 0px;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-3238340011985325474?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/3238340011985325474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=3238340011985325474' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/3238340011985325474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/3238340011985325474'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2008/03/safari-form-spacing-problem.html' title='Safari form spacing problem'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-6987554542540592476</id><published>2007-09-27T14:28:00.000-07:00</published><updated>2007-09-27T14:35:37.160-07:00</updated><title type='text'>Safari crash on mismatched tags</title><content type='html'>If Apple's mac web browser, Safari, crashes on your web page, look for mismatched beginning and end tags. With a fairly complex page, using lots of CSS, we found that Safari was crashed by a simple mismatch of h1 (opening) and h2 (closing) tags ... note that we first debug-interpolated the error to the CSS file, but there was no error to fix ... the typo was in HTML that used the CSS file ... &lt;br /&gt;&lt;br /&gt;(keywords: crash, crashes, crashed, safari browser)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-6987554542540592476?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/6987554542540592476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=6987554542540592476' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/6987554542540592476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/6987554542540592476'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/09/safari-crash-on-mismatched-tags.html' title='Safari crash on mismatched tags'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-11815218524117845</id><published>2007-09-25T19:02:00.000-07:00</published><updated>2007-09-25T19:07:17.264-07:00</updated><title type='text'>Firefox img border problem</title><content type='html'>Of course, since Firefox is probably the most compliant browser, this is more an artifact than a problem. But I'd like to help people out with this, so I'll keyword it: problem, bug, issue ...&lt;br /&gt;&lt;br /&gt;In Firefox an image (img) with (a href) link tags around it, often shows up with a visually unwanted blue border. The fix is simple. Set " border=0 " in the img tag:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt; img src="file.jpg" border=0 &gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-11815218524117845?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/11815218524117845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=11815218524117845' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/11815218524117845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/11815218524117845'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/09/firefox-img-border-problem.html' title='Firefox img border problem'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-5417114671176060475</id><published>2007-08-31T17:17:00.000-07:00</published><updated>2007-08-31T18:22:23.023-07:00</updated><title type='text'>Good habits: lengthen your history</title><content type='html'>It's important to know what you've done, as a sysadmin. If you're one of a group of admins, history becomes even more important.&lt;br /&gt;&lt;br /&gt;The first thing I do on a legacy Linux system, is edit /etc/profile, and change HISTSIZE to 100000 or more. Note, this does not erase previous history (although etting it to zero will).&lt;br /&gt;&lt;br /&gt;Of course, "history" records only one side of the conversation. The responses of the machine are just as important. Unfortunately, there's no straightforward mechanism like history, which would automatically log everything you see. Your terminal client can often do this for you, but it would be nice to do it on the machine itself. &lt;br /&gt;&lt;br /&gt;To bug the bash people about this, for their next release, &lt;a href="http://tiswww.case.edu/php/chet/bash/bashtop.html"&gt;go here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The "script" command is a temporary fix ... it records your session in a transcript file. You type "exit" or ^d to stop recording. It writes into a file called "typescript", unless you specify something different.&lt;br /&gt;&lt;br /&gt;Trying to automate this:&lt;br /&gt;&lt;br /&gt;... you cannot just put "script" in your .bashrc file ... it will go into an infinite loop, because "script" itself starts a new shell (when you stop this, amusingly, you'll find yourself at the bottom of a few hundred nested shells ...)&lt;br /&gt;&lt;br /&gt;You can't put it in .login ... because script starts a shell. When .login exits, so will the "script" shell. But that's not what you need.&lt;br /&gt;&lt;br /&gt;What you need to do, is set an environmental variable in .bash_login, unset it in .basrc, and then start "script" just once.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-5417114671176060475?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/5417114671176060475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=5417114671176060475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/5417114671176060475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/5417114671176060475'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/08/good-habits-lengthen-your-history.html' title='Good habits: lengthen your history'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-4006337475749759022</id><published>2007-08-13T16:10:00.000-07:00</published><updated>2007-08-13T16:19:07.181-07:00</updated><title type='text'>MSN Messenger very broken on Macs</title><content type='html'>Microsoft's closed-protocol Windows Live, Microsoft Messenger IM environment will work for a mac under some conditions. If you first authenticate on the machine you first sign in on, you're ok, and the client works passably well (although there are many irritations, like a nearly useless search feature) ... but if you need to take on previously authenticated identities, you're hosed. It simply doesn't work on a mac. The re-authentication e-mail never gets sent. Also, the web ui, "webmessenger.msn.com" is simply broken for any browser that runs on a Mac (Firefox, Safari, and the old IE) ... it loses connections and messages quite easily.&lt;br /&gt;&lt;br /&gt;However, MSN Messenger even works well on 8-year-old machines running Windows 2000 Pro ... set one up so you don't need to buy a new machine and give money towards Microsoft's monopoly-driven attempts to create working software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-4006337475749759022?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/4006337475749759022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=4006337475749759022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/4006337475749759022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/4006337475749759022'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/08/msn-messenger-very-broken-on-macs.html' title='MSN Messenger very broken on Macs'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-1030527214720262257</id><published>2007-03-26T14:56:00.000-07:00</published><updated>2007-03-26T19:38:11.306-07:00</updated><title type='text'>cp -r hangs. use cp -R.</title><content type='html'>My primary purpose for this blog, is to make small little nuggets that a search engine will find, when you have a problem, and you haven't slept for three days, and you type in the first thing that comes to you.&lt;br /&gt;&lt;br /&gt;I could do this with keywords: cp, cp -r, cp -R, hangs, takes forever, special devices, licq_fifo, linux, unix, large copy, massive copy, etc.&lt;br /&gt;&lt;br /&gt;But that's not the way you think when you haven't slept. If you're a human, you ask questions "why is my cp hanging?" or "my copy is hanging, but why?" or just statements "my cp hangs" or "my copy hangs." Very commonly, you think in terms of &lt;i&gt;time-based sequences&lt;/i&gt; of statements, as if you were talking to a doctor ... something like "I'm on Linux. I had to copy a lot of data from one disk to another. One disk is remote, using NFS. I used cp -r. It took forever, so I did df, and found that the new disk size wasn't increasing. Then I killed it with control-c. And ran it cp -r -v, to see what was going on. It got hung up on a file licq_fifo. I googled licq_fifo, and found out it was a special device. cp -r doesn't follow symbolic links, why would it not recognize special devices? Oh, wait, I remember this, it's a normal problem. I typed "man cp", and then the more recent "info cp". And, right, cp -R will ignore special device files. I should go to sleep."&lt;br /&gt;&lt;br /&gt;This is of course the simplest problem, quite quick to resolve. But look at the volume of problem-solving information in the above paragraph. What can we do to make search engines more like expert systems, so that we can preserve more of the world's problem-solving-sequence information? Not just with IT, but with everything involving such traversals of ordered fuzzy graphs?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-1030527214720262257?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/1030527214720262257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=1030527214720262257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/1030527214720262257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/1030527214720262257'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/03/cp-r-hangs-use-cp-r.html' title='cp -r hangs. use cp -R.'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-5215323381590671034</id><published>2007-03-23T23:04:00.000-07:00</published><updated>2007-03-24T17:21:14.522-07:00</updated><title type='text'>Discovering a legacy purpose for LDAP / slapd</title><content type='html'>If you're on a legacy Linux/Unix system, and you notice slapd running a directory service, you might wonder: what is this directory service for? What is slapd doing? Why is ldap here? Why do I have slpad running? What data is slapd serving? [I'm playing with search engines here -- I typed these questions into google and found nothing quickly.]&lt;br /&gt;&lt;br /&gt;A search of the data will answer most of your questions. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;ldapsearch&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;.. is a common LDAP client command on Linux/Unix. It will tell you if no ldap is available ("Can't contact LDAP server"). &lt;br /&gt;&lt;br /&gt;But, even with a slapd daemon running, you won't find any data by typing this command with no arguments. You need to tell it where to start looking: the base of the ordered data on the local server.&lt;br /&gt;&lt;br /&gt;So, find the config file -- usually somewhere like /etc/ldap/slapd.conf. If it isn't there, use "locate slapd" or "locate ldap" to find it.&lt;br /&gt;&lt;br /&gt;In the file, you'll see something vaguely like this:&lt;br /&gt;&lt;br /&gt;# The base of your directory&lt;br /&gt;suffix          "dc=onething,dc=something,dc=else"&lt;br /&gt;&lt;br /&gt;Use the string in quotes to search your directory:&lt;br /&gt;&lt;br /&gt;ldapsearch -b "dc=onething,dc=something,dc=else"&lt;br /&gt;&lt;br /&gt;You'll see the data, and then the purpose of LDAP on your server should be quite clear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-5215323381590671034?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/5215323381590671034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=5215323381590671034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/5215323381590671034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/5215323381590671034'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/03/discovering-legacy-purpose-for-ldap.html' title='Discovering a legacy purpose for LDAP / slapd'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-6593981960932543404</id><published>2007-03-16T21:23:00.000-07:00</published><updated>2007-03-16T21:38:04.611-07:00</updated><title type='text'>BIOS disappears</title><content type='html'>I'm putting an EIDE drive in a 7-year-old server, which has SCSI disks from that time -- still working, but they're very small.&lt;br /&gt;&lt;br /&gt;There's only one startup setting I need to change:&lt;br /&gt;&lt;br /&gt;I hit "delete" to enter the "CMOS Setup Utility".&lt;br /&gt;&lt;br /&gt;I go to "BIOS Features Setup".&lt;br /&gt;&lt;br /&gt;The setting I need to change is "HDD Sequence SCSI/IDE First".&lt;br /&gt;&lt;br /&gt;I need to set it to SCSI, which is still the boot drive. The default is IDE ... the shop that made the server didn't need to change this, because there were no IDE drives ... they should have, but oh well.&lt;br /&gt;&lt;br /&gt;But, inexplicably, sometimes, the system doesn't boot up properly. What's up?&lt;br /&gt;&lt;br /&gt;Oh. 7-year-old server. The little CMOS backup battery is dead. I've been turning the machine off at the power strip, and it doesn't get the 3 volts it needs to keep my one change to the BIOS ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-6593981960932543404?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/6593981960932543404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=6593981960932543404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/6593981960932543404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/6593981960932543404'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/03/bios-disappears.html' title='BIOS disappears'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-117005613582399739</id><published>2007-01-28T23:31:00.000-08:00</published><updated>2007-01-28T23:36:55.056-08:00</updated><title type='text'>In a deadirectory</title><content type='html'>After some apt-get update and apt-get install, I get this funny error message when I try to restart apache:&lt;br /&gt;&lt;br /&gt;"shell-init: could not get current directory: getcwd: cannot access parent directories: No such file or directory"&lt;br /&gt;&lt;br /&gt;But the command runs fine.&lt;br /&gt;&lt;br /&gt;Something felt familiar ... oh right. This is a UNIX error message for "you are in a directory that no longer exists".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-117005613582399739?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/117005613582399739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=117005613582399739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/117005613582399739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/117005613582399739'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/01/in-deadirectory.html' title='In a deadirectory'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-116771584121455215</id><published>2007-01-01T21:25:00.000-08:00</published><updated>2007-01-28T23:38:08.983-08:00</updated><title type='text'>Mysql broken increment</title><content type='html'>Changing table names, I changed the name of the primary key as well, and forgot to set all the attributes. &lt;br /&gt;&lt;br /&gt;If you don't, things start to break, because the attributes aren't "saved" for you in any way. For example, the auto-increment stops working, the table is no longer functional, and you get this error:&lt;br /&gt;&lt;br /&gt;Duplicate entry '0' for key 1&lt;br /&gt;&lt;br /&gt;To fix this, add the attributes to the primary key field. This won't hurt the values (at least, it didn't for me):&lt;br /&gt;&lt;br /&gt;alter table X change column key_name key_name int(12) unsigned not null auto_increment&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-116771584121455215?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/116771584121455215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=116771584121455215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116771584121455215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116771584121455215'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2007/01/mysql-broken-increment.html' title='Mysql broken increment'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-116198557646143925</id><published>2006-10-27T14:42:00.000-07:00</published><updated>2006-10-27T14:46:16.466-07:00</updated><title type='text'>Upgrading to PHP 5 -- fix 3</title><content type='html'>And, of course, there's the famous "backslash" or "magic_quote" problem. The only way to sensibly develop a large PHP app is to turn magic_quote Off in the php.ini file. That way, you can get reliable behavior from addslashes &amp; stripslashes. When you port to a new php implementation, however, you'll find that, by default, magic_quotes is On. Edit php.ini, turn magic quotes Off, issue a /etc/init.d/apache2 restart, and your text inserts &amp; fetches shouls be fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-116198557646143925?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/116198557646143925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=116198557646143925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116198557646143925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116198557646143925'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2006/10/upgrading-to-php-5-fix-3.html' title='Upgrading to PHP 5 -- fix 3'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-116158603941547437</id><published>2006-10-22T23:13:00.000-07:00</published><updated>2007-01-28T23:39:25.293-08:00</updated><title type='text'>Upgrading to php5 -- fix 2</title><content type='html'>I get: &lt;br /&gt;&lt;br /&gt;"Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' " ....&lt;br /&gt;&lt;br /&gt;I notice that my old command line entrance into mysql isn't working, and I get:&lt;br /&gt;&lt;br /&gt;"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' "&lt;br /&gt;&lt;br /&gt;Ah ... mysqld isn't running. So:&lt;br /&gt;&lt;br /&gt;mysqld_safe &amp;&lt;br /&gt;&lt;br /&gt;... which finds the old config files fine. Errors disappear. Everything's up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-116158603941547437?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/116158603941547437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=116158603941547437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116158603941547437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116158603941547437'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2006/10/upgrading-to-php5-fix-2.html' title='Upgrading to php5 -- fix 2'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-116158396308852320</id><published>2006-10-22T23:09:00.000-07:00</published><updated>2006-10-22T23:12:43.093-07:00</updated><title type='text'>Upgrading to php5</title><content type='html'>After a major Linux distro upgrade&lt;br /&gt;&lt;br /&gt;This message (from php):&lt;br /&gt;&lt;br /&gt;Fatal error: Call to undefined function: mysql_connect() ...&lt;br /&gt;&lt;br /&gt;Mysql wasn't bundled in. So I typed:&lt;br /&gt;&lt;br /&gt;apt-get install php5-mysql &lt;br /&gt;&lt;br /&gt;... which fixed the problem&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-116158396308852320?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/116158396308852320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=116158396308852320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116158396308852320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116158396308852320'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2006/10/upgrading-to-php5.html' title='Upgrading to php5'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36088674.post-116095476391760694</id><published>2006-10-15T16:08:00.000-07:00</published><updated>2006-10-15T16:35:07.356-07:00</updated><title type='text'>Odd characters in PHP server output</title><content type='html'>Switched from php4 to php5. &lt;br /&gt;&lt;br /&gt;First problem: strange control characters that the browser renders as black diamonds with a question mark inside. Like this: �� &lt;br /&gt;&lt;br /&gt;So I saved the html file. &lt;br /&gt;&lt;br /&gt;Looked at it with vim -b. &lt;br /&gt;&lt;br /&gt;The confused black diamonds were "a0" in hex.&lt;br /&gt;&lt;br /&gt;I typed "a0" into Google.&lt;br /&gt;&lt;br /&gt;Others had &lt;a href="http://blog.gmane.org/gmane.comp.lang.perl.modules.petal/month=20040501"&gt;this problem, with perl&lt;/a&gt;. It was a matter of content-type character sets (charset): is0-8859-1 vs. UTF-8 ...&lt;br /&gt;&lt;br /&gt;Looked at the HTML output of another server I had (with php4) for phpinfo(). Compared side-by-side with the php5 output. Very useful ... a bunch of sections with settings in tables. It was in a section entitled "HTTP Headers Information", subheading "HTTP Response Headers". The good server had the name/value pair:&lt;br /&gt;&lt;br /&gt;Content-Type text/html; charset=iso-8859-1&lt;br /&gt;&lt;br /&gt;... the bad, problem server had:&lt;br /&gt;&lt;br /&gt;Content-Type text/html; charset=UTF-8&lt;br /&gt;&lt;br /&gt;So, I looked at the /etc/php5/apache2/php.ini file.&lt;br /&gt;&lt;br /&gt;there's a line that read:&lt;br /&gt;&lt;br /&gt;;default_charset = "iso-8859-1"&lt;br /&gt;&lt;br /&gt;I tried removing the leading semi-colon (uncommenting). Typed:&lt;br /&gt;&lt;br /&gt;/etc/init.d/apache2/restart&lt;br /&gt;&lt;br /&gt;And that fixed it. The diamonds disappeared.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36088674-116095476391760694?l=littlefixes.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littlefixes.blogspot.com/feeds/116095476391760694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=36088674&amp;postID=116095476391760694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116095476391760694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36088674/posts/default/116095476391760694'/><link rel='alternate' type='text/html' href='http://littlefixes.blogspot.com/2006/10/odd-characters-in-php-server-output.html' title='Odd characters in PHP server output'/><author><name>Greg Bryant</name><uri>http://www.blogger.com/profile/13408526593029789018</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04220980010740120693'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>