Skype Can Be a Pain In the Ass

I don’t restart my computer very often; it mostly runs 24/7. So when I did have occasion to do a restart, I was hit with the issue that my development instance of Apache wouldn’t start. I would get the error: “Windows could not start Apache 2.2 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1.”

Never one to follow instructions, after several retries, much teeth-gnashing and hair-pulling, I decided I might make more headway were I to have a look at the Apache error log.

Nothing. Zip. Zilch. Zero. Nada. Just a note that the file had been overwritten.

So, maybe following suggestions is a good thing. Opened up the WinXP event viewer. Hallelujah, there it is.

“The Apache service named  reported the following error: >>> no listening sockets available, shutting down.”

I have Apache configured to listen on port 80, so I don’t have to go through shenanigans when I’m developing a site. What this error is telling me is that port 80 isn’t available to attach to – probably because some other program got there first.

I’ve never had this problem before. What’s different between now and the last time I restarted my machine with no problems?

Aha! I upgraded Skype.

Sure enough: shut down Skype, Apache starts up normally.

Skype was hijacking my listening socket, and because it’s higher up on the auto-start list than Apache, Apache choked.

AFAICT, this wasn’t previous Skype behavior. I’ve never had the issue before, so logically the last upgrade changed things.

So I set Skype to start manually instead of automatically. Problem solved.

45 minutes wasted, never to return. I know that’s not much, but still.

You Don’t Have Permission To Do That

Website security is critical, on that I’m sure we’d all agree.

But it can sure be a pain in the ass sometimes. Can I hear a “hell YEAH!”?

So what do you do when WordPress tells you, “You don’t have permission to do that“? Or when in some fashion you see a message that WordPress is “Unable to create directory – Is its parent directory writable by the server?

If you’re not geekily inclined, you call in a professional. Like me. Who’s supposed to know everything about WordPress.

So when I was hit with both of these today on my own blog, I did what any experienced professional troubleshooter does — look for the complicated causes first. I mean, this can’t be something easy, right?

The first error I hit was when trying to add a new category during a post. Little red box says, “You don’t have permission to do that”. Wonderful. Well, I know I do. At least I think I do. So in true spirit of a troubleshooting professional, I open a new tab and look into the options table of the database because this can’t be anything simple. Yeah, everything looks right. So what’s the problem? Do I need to reinstall? (I really didn’t consider that, but for some people at the first sign of trouble, that’s what they do)

Well, poo. I guess the next step is to close the browser, clear the cache, and try again.

Hit the ‘Save Draft’ button on the post, it saves and reloads. The error goes away. What the hell, I’ll try again.

No errors, category added.

Ajax really chaps my ass sometimes…

So I finish up the post, and decide I want to add a plugin or two and I’ll play with the new search/auto-install features. I’m not a fan of auto-install. But I’m willing to work with it, because my clients are going to and I’d better know what’s up with it.

I find a plugin I want through the search feature, hit the install buttons and everything works flawlessly. Surprised? Hell yeah! It worked!

I knew of a plugin I wanted to install that isn’t in the WordPress plugins repository. I had a zip file on my machine, so I thought I’d try the “upload zip file and install” functionality. Hit the button, locate the file, hit continue…

Ha! There it was! I knew it! I knew it wouldn’t work. Where I was supposed to be seeing the sucess messages I was instead presented with “Unable to create directory – Is its parent directory writable by the server?

This is an error that has to do with permissions on files, and folders. I KNOW those were set right, because I set up my own blogs. I know what I’m doing (tongue firmly planted in cheek here). So after going through all of the file permissions just do double-check (FYI, necessary file permission settings are here), I started looking for more simple solutions.

Mod_security. “That’s the trouble,” I thought (mod_security is an Apache web server module designed to help keep the rifraff off of your server). That module has been a pain in my butt ever since WordPress start using the Flash-based uploader. Same sort of problems. That has to be the cause.

Nope. I’d already fixed that.

I wish I could say that I figured it out on my own. I suppose I would’ve, eventually. But fortunately Mr. Google had the answer, in the form of this conversation on the WordPress support forums.

What it finally boiled down to was a file path on the Settings > Miscellaneous page was wrong. WordPress had divined and preloaded the supposedly correct path to my uploads folder. What should have been in the box is wp-content/uploads. What was actually there was the full server path to the uploads folder, prefixed with a slash. The slash is what was causing the problem. On its face it looked correct (*nix file paths are normally notated with a beginning slash), but in this case it wasn’t. Removing the slash cured the problem.

Moral of this rather long story? Look for the easy solutions first.