This video helped me get my brain wrapped around the discussion, at least a little.
Category Archives: tech
WordPress Permalinks issue with Bluehost
If you’ve tried running WordPress on Bluehost, you may have run into this: you change your Permalink Settings, and the site no longer works. You get “403 Permission Denied”.
The fix is pretty simple. Just edit the .htaccess file in the blog’s root directory and add the line Options +FollowSymlinks
. I put it after <IfModule mod_rewrite.c>
because that was suggested by the article that I found on the interwebs.
I don’t know why I’ve only had to do this with Bluehost, but their tech support told me that they don’t have any plans to fix whatever the underlying issue is.
Moving a Joomla site with Akeeba Backup (JoomlaPack)
I was trying to use Akeeba Backup (formerly “JoomlaPack”) to move a Joomla site from a temporary location under my personal site to its own hosting account. The site packed up fine, but I got the error “Could not open logs/index.html for writing” when unpacking with kickstart.php.
A little research revealed that you sometimes get this error when unpacking to a hosting account’s root folder. You can get past this by unpacking to a subdirectory and then moving the files to the root. It looks to me like my host, 1and1, wasn’t allowing the kickstart scripts to write to the logs folder. I couldn’t figure out how to fix the permissions, so I used the subdirectory workaround. After unpacking everything to a subfolder and then moving it to the root, I just needed to change two paths in configuration.php and the site was working. I never was able to move logs/index.html to the main logs folder, but the site is working fine without it.
I did need to follow one important tip in the Akeeba Backup manual and force “binary mode” when transferring the site’s .jpa archive file down from the original host and up to the new site.
Analyze a Bot-Infected Host with Wireshark
Here’s a video by Laura Chappell analyzing the network traffic from a bot-infected host. Good stuff!
Dotnetnuke Menu Bar Broken in Firefox
When our users started upgrading to Firefox 3.0.10, they began noticing that our Dotnetnuke intranet’s menu bar was broken — only “Home” showed up, not the rest of the page titles.
It turns out that DNN uses a config file to tell it what capabilities the various browser versions support. For some reason, the user agent string from Firefox 3.0.10 isn’t recognized.
I empathize with the arguments on the DNN forums that it’s not a good practice to maintain a table like this, but I’m not going to try to rewrite DNN. Since I’m not worried about really old versions of Firefox accessing our Intranet site, my fix was to edit the file \js\ClientAPICaps.config and add this to the first section:
browser contains="Firefox"
iTunes lost my music library
Hoping that this will help someone who experiences this in the future, I thought I’d briefly write up what happened when I switched my Windows machine from one domain to another, and my iTunes library disappeared.
What happened: My machine had been a member of domain A, and I had redirected “My Documents” and all of its subfolders (noteably “My Music”) to D:\MyDocuments. My iTunes music was in d:\MyDocuments\My Music\iTunes\iTunes Music and the corresponding .itl and .xml files were right above that in d:\MyDocuments\My Music\iTunes.
I moved my computer to domain B, knowing that I would get a new profile and a lot of cleanup work. I should have remapped My Documents right away, but I didn’t. I ran iTunes, and it had to do some reinstallation under the new user profile. It finally opened, showing an empty music library.
After reading some articles online, I thought I could go into Preferences, Advanced tab, and just point iTunes to d:\MyDocuments\My Music\iTunes\iTunes Music. All of the documentation seems to indicate this, but it doesn’t work. It turns out that the pointer in the Advanced tab probably only tells iTunes to look there for the music, but not for the .itl and .xml files that describe the library. iTunes was still looking in my new profile path at a blank set of those files Of course, it took me hours to figure that out.
There are probably two solutions: move the correct .itl and .xml files to the new profile path, or repoint My Documents again so that iTunes finds the existing files in d:\MyDocuments\My Music\iTunes. I chose the second, and it worked well.
By the way, I couldn’t remember how I’d originally remapped My Documents, so I downloaded TweakUI. The only downside was that TweakUI has you individually map My Documents, My Music, My Pictures, etc. The method that I’d used before mapped them all when you remapped My Documents.
PureText: Paste Plain Text!
The utility that I’ve needed for years and finally looked for: PureText.
So many times I copy text from a web page or other document and need to paste it into an application that doesn’t offer the “Paste Special” option. I just want the text, not the formatting.
PureText lets you create a shortcut key (Windows-V by default) that will paste just the plain text from the clipboard.
Update (12/4/2012):
Now that I’m using a Mac most of the time, I use “Plain Clip” every day. I just copy some text, click once on the Applications stack in the dock, then type “plai” and hit enter to clear the formatting out of the clipboard. I’m sure there’s a quicker way, but that’s my habit now.
Redirecting stdout and stderr in a batch file
One thing that I constantly need and can never remember the syntax for is redirecting stdout and stderr in a Windows batch file or cmd script (actually, the syntax is pretty much the same for *nix shell scripts).
Rather than just a one-sentence note here to remind me, I’ll write a few more sentences as explanation. Hopefully this will save someone a little bit of time
For starters, you can redirect the output of a command to a file like so:
blah.exe > output.txt
That example will overwrite any pre-existing output.txt file. If you want to append to the file, use:
blah.exe >> output.txt
But this only redirects “standard output” (stdout). If your program encounters an error, the output generated by the error condition probably won’t show up in the file. If you want it to show up in the file, redirect “standard error” (stderr) also like so:
blah.exe 2>&1 output.txt
At the moment, I can’t tell you if that will append or overwrite. I’ll check that out and update the post…