Archive for the ‘Web Development/Programming’ Category

WordPress Meta junkies: Use Headspace2

Sunday, July 12th, 2009

I haven’t been a WordPress user very long, but I have found one plugin that eased a big issue with me: Good meta descriptions in WordPress posts, categories, and archives. Out of the box, WordPress isn’t really equipped o use Excerpts as the Meta Description for a post. Enter Headspace2, which allows WP authors to edit Meta Descriptions to their heart’s content.

Solution to Deployment issue using Netbeans 6.5.1 and Tomcat 6.0.22 on OX 10.5.7

Thursday, June 25th, 2009

Somehow I always find myself in the middle of a very strange computer problem. This particular issue is a result of my wanting to learn to write JSP applications using Netbeans 6.5.1 with Tomcat 6.0.20. I don’t have time to do a full writeup, so here’s a nutshell version of the problem and my solution:

Problem

When I tried to use the Deploy option to push my Netbeans project to my Tomcat webapps folder, the deployment would fail. I could manually copy the .war file into my Tomcat webapps folder and everything would work fine. But, I thought, “Why should I have to do this if Netbeans is supposed to do it for me?”

Solution

Since I’m running OS X 10.5.7, I opened the Netbeans configuration file at

/Applications/NetBeans/NetBeans6.5.1.app/
Contents/Resources/NetBeans/etc/Netbeans.conf

and added the following to the netbeans_default_options line:

-J-Djava.io.tmpdir=/tmp

Note: This must be added within the double quotes. Also, I didn’t distrub anything that was on the line already but merely added that tidbit of code.

Explaination

I found this piece of advice buried deep in a forum. Apparently, Netbeans puts the deployed files into a temporary folder before deploying them. The temporary folder it tries to use on OS X isn’t accessible (a permissions problem I guess). Adding that snippet of code tells Netbeans to use the OS X default temporary folder tmp for its intermediate work.

Enjoy!

What to do if XAMPP for Windows won’t load anything under localhost

Sunday, December 3rd, 2006

I’ve used XAMPP for Windows on my laptop as a testing server for over a year with no problems. Today, though, I started the Apache and MySQL services as I have many times in the past only to find that both localhost and 127.0.0.1 did not work in my browser. Here’s some of the things I tried that did no good and some notable facts:

  1. I tried localhost:80 and 127.0.0.1:80 with no effect
  2. I disabled the Windows firewall. No dice.
  3. I uninstalled the Apache service. No change.
  4. I uninstalled/reinstalled XAMPP multiple times with multiple versions. No change.
  5. When I would put localhost in the browser, I did not receive a "Page cannot be found" error. Instead, the status bar would indicate "Waiting for localhost." I waited more than ten minutes to see if anything would happen at one point. Nothing did: The screen remained white.
  6. It didn’t matter what browser I used. IE, Firefox, and Opera all sat there and waited while nothing happened.
  7. I have made no system changes since the last time I ran XAMPP except for the regular barrage of Windows Updates.

While I don’t know exactly what broke my XAMPP installation, I can almost guarantee that a Windows Update killed it. I know Microsoft can’t keep every program under the sun from breaking with its updates, it could do a better job of telling you exactly what each update does without having to dig through 500 lines of the KB articles. Anyway…

I managed to fix the problem, as per this article posted in the Apache Friends forums. In the C:\program files\xampp\apache\bin\httpd.conf file, I added the following line:

Win32DisableAcceptEx

From the best I can tell, this has something to do with Apache’s interaction with Windows’ WinSock 2 API. I’d say some security update managed to fix a problem in WinSock but break Apache. It makes me feel really stupid that I don’t know exactly what caused the problem or exactly how the solution actually fixed it. I’m just glad everything is working now. I can actually get to work on the project I needed the server for in the first place.

What is the difference between “quirks mode” and “standards mode” in Firefox?

Thursday, December 29th, 2005

Go to http://www.webmasterworld.com/forum21/7975.htm for a great explanation of standards mode and quirks mode.