Archive for the ‘ Fixit ’ Category

Invoke Quicksilver In All Spaces After 10.6 (Snow Leopard) Upgrade

After upgrading to 10.6 my beloved Quicksilver had grown some new bad habits. If I wasn’t in the first space (#1 / top left), Quicksilver would bring me back there every time I invoked it. So if I was trying to open an app or run a command in Space #2, running a Quicksilver command would bring me back to Space #1. VERY annoying.

Here’s the fix:

  1. Make sure you’re running the latest version of Quicksilver: b56a7
  2. In Preferences > Application, check “Show icon in dock”

Now, I don’t want the app showing up in my dock or running applications list either, but until they fix this error (which may take some time) it’s far less obnoxious than the issue I was trying to solve!!

As a side note, it’s very important to make sure you’re running the latest version (link above). Before updating to b56a7, I couldn’t see the Preferences screen after upgrading to 10.6 (just had a blank white panel), so obviously #1 must come before #2!

Solve Slow iDisk Syncing After Upgrading to 10.6 (Snow Leopard)

I use iDisk Sync (via MobileMe) to keep my desktop and my laptop in sync so I don’t have to remember to copy files back and forth every time I grab one or the other. This worked great until my upgrade to 10.6 – ever since then the iDisk status bar would say “Checking items” for hours, never really seeming to do anything. I finally found a fix that seems to have done the trick, thanks to Matio Martin and John Brissenden over at this very long support post. Here are the steps:

  1. Go to System Preferences > MobileMe > iDisk
  2. Switch off iDisk sync and keep it switched off
  3. Log out of MobileMe in the Account tab
  4. Log in again with nonsense login details (make up anything – you’ll get a login error. This somehow “resets” everything)
  5. Log in properly with your correct user/pass
  6. Turn iDisk syncing back on (you may need to re-enable everything on the Sync tab as well – just choose “Merge Data” – everything worked flawlessly for me)

Granted, this will take some time as each machine re-downloads everything on your iDisk. It took about 30 minutes to download the 2.5GB I have on my iDisk. But once that was completed it’s working smoothly again – almost feels even faster than it was on 10.5. I can’t tell you exactly how or why it works – but it appears as if it has re-mapped all of the files and it’s no longer churning endlessly in vain.

Database Exports From phpMyAdmin Add Garbage Text After Every Link

This is an issue that has plagued me for months and months, and I finally found a way around this VERY strange bug.

For some reason, exporting a database from phpMyAdmin inserts garbage after EVERY LINK in the database content. So if you have a database row with in the data, it will end up looking something like after export. Obviously, this causes all kinds of issues.

The only way I’ve found to stop this behavior is to NOT check “Save as file” when exporting your database. Just click “Go” and let the dump print to screen. Then copy/paste it into a text file (save as .sql) and import that into your database. If the export is too large to print to screen, you’ll have to manually do a search and replace on the resulting .sql file. The hash that comes after ?phpMyAdmin= is different on every export, but luckily it’s the same in each dump file – meaning it’s relatively easy to find it and replace it.

PHP mail() And Gmail – A Warning on Headers

Today, out of nowhere, we started receiving reports that HTML email the site was sending were showing up as just that: HTML code and not much else. Running a few tests confirmed these reports… but only in my gmail account. We went back and checked the reports and sure enough – they were all coming from gmail users.

After some tinkering and futzing around we realized that the Windows line breaks that we had after the headers (rn) were the problem. Here’s an example:

This will show up as two line breaks in gmail and trash your HTML formatting:
$headers = "MIME-Version: 1.0rn";

This, however, will fix the problem and show up in gmail just fine:
$headers = "MIME-Version: 1.0n";

I’m sure if you were sending mail from a Windows server this may not be the case, but for those on a Unix box, just stick with n. Google will thank you by displaying your HTML email the way it was meant to be displayed – without raw code!

Enable mod_rewrite on OS X 10.4 (Tiger)

Tiger has introduced a new super-confusion level to the stock configuration of Apache. In addition to the httpd.conf file in the /etc/httpd directory, there’s now a new users directory as well. That directory holds unique config files for each user of the machine. So, if you were to enable mod_rewrite or AllowOverrides in httpd.conf, you may find that it doesn’t quite cut the mustard in your personal Sites directory. Let’s take a look:

To enable mod_rewrite:

  1. Open /etc/httpd/httpd.conf
    (I highly recommend TextMate – from the command line you can simply type this:
    $ mate /etc/httpd/httpd.conf
    or use the old standards: vi, vim, whathaveyou)
  2. Go to line 223 (if your config file just so happens to jive with mine) and uncomment the following line:
    LoadModule rewrite_module libexec/httpd/
    (mind the wrap)
  3. Go to line 267 and uncomment the following line:
    AddModule mod_rewrite.c
  4. Scroll down to line 408 and change the line to read:
    AllowOverride All
    (Some server admins will tell you this may not be the best idea for hosting a live site, but I’m assuming you’re using this for local development only, right?)
  5. Uncomment line 454:
    AccessFileName .htaccess
  6. Restart Apache:
    $ sudo apachectl restart

At this point you should have mod_rewrite happily fixing your ugly URL’s in the /Library/WebServer/Documents directory, but it’s not working in your /Users/you/Sites directory. What gives? Here’s the trick:

  1. Open the yourname.conf file in the /etc/httpd/users folder.
  2. Change the first two lines to this:
    Options All
    AllowOverride All
  3. Give Apache another bounce:
    $ sudo apachectl restart

You should now be seeing friendly url’s in your very own Sites directory.