Apache htpasswd command line utility doesn't run

I installed Apache 2.2 about three years ago, and it runs fine, but until recently I haven’t had any reason to create a .htpasswd file. But a client asked me to password protect a directory on his Web site, so I created the .htaccess file, and then read the documentation on creating the .htpasswd file. I had never explored this before, and didn’t even know of the existence of the htpasswd command line utility.

When I go to the /bin directory and click on the htpasswd command line utility, it will flash on the screen for a split second, and disappear. It will not open.

Is there something missing from my installation, or is there something I need to do to enable this utility? The same thing happens with the other utilities that appear in the /bin directory.

I did get the .htpasswd file created (my Tech Support created it for me on the live server) so that problem is taken care of, but I would like to have a fully functioning server for my Web development work.

I’m running Apache on a Windows machine with XP Pro, and PHP 5.3 installed, along with MySQL. These were installed and configured individually (not WAMP).

Thanks in advance.

Bill Otis (Bill O.)


I suspect that your utility is a DOS executable which should be run from a cmd.exe window (on a WinDoze box).

Admittedly, it’s been ages since I’ve even attempted that (using XP, too, years ago) but I’ve given up on securing directories on my test server (W7/64) and only use cPanel on the production server (which I require to be on a Linux box for better security).

Are you closer to Andover or … Erie?



While I’m an aspiring ‘geek’ and have learned a whole lot in the last few years, I don’t understand why this might be a DOS executable (I downloaded the Windows version of Apache), and I’m not sure how I would run it from the Windows Command Line (if that’s what you meant). Perhaps it’s more trouble than it’s worth. I know I can create the file online at various Web sites. However, as and aspiring ‘geek,’ I like learning how to do things myself, which is why I chose to install Apache, PHP, and MySQL individually rather than downloading the WAMP package. I found that it wasn’t very dificult, and I certainly did learn a lot doing it that way.

I’m a reseller host (I host on Host Department), and my host is always willing to do these things for me (their Tech Support is excellent), so Tech Support created the .htpasswd file for me, and they had it done in no time, while I had spent hours trying to figure out how to get this Command Line utility to run! I’d still like to get it to work, just for the satisfaction, and for being able to create the file myself in the future, using my software.

You must be familiar with this area. Andover is only 16 miles up the road (SR 7) from here. Erie is almost exactly 69 miles, about the same distance as Cleveland and Pittsburgh from our door. Andover is a very nice little town, and I used to get up there a lot as a self employed ceramic tile installer (http://kinsmantile.com/), but that’s another story. Don’t get up there much anymore.

When I built that Website (the original was very amateurish!) was right after I had bought MS Front Page 2003, and of course it was table based, and not too pretty. Somewhere along the line I learned about CSS (probably from Sitepoint) and I changed my ways very quickly and happily. I ordered “HTML Utopia: Designing Without Tables using CSS” (Rachel Andrew & Dan Shafer) and life changed. The rest is history. I love this stuff; but, I have always been a “techie” kind of guy, having spent many years in electronics.

Thanks for your help. Maybe I can figure out how to get that to run.

Best regards,
Bill Otis

Hi Bill!

It’s actually been a few years since I made the attempt to use an encryption program on my WinDoze box but I do recall that it had to be used in a DOS (command line) mode. What you described reminded me of more recent attempts to use executable files which were intended for the command line as they would flash a box on the WinDoze screen then disappear. Give it a try from the command line and see if it doesn’t stay visible long enough to actually work with it.

I’m delighted to read that you’ve installed your WAMP daemons without using a canned package like WAMP or XAAMP. I’m sure that you’ve learned a lot more and will be able to update individual daemons without waiting for the package creator to catch up (and, likely, destroy all the configurations you’ve made to packaged files). I prefer to do that (individual daemons) so I can be assured that I can match my host’s configuration as closely as possible.

Others: I understand that Kevin Yank’s excellent PHP/MySQL/Apache book has been “updated” to use canned installation scripts. However, I still have the older copies of the earlier FREE Chapter 1 (Installation) in which Kevin led the reader through installing and configuring the individual daemons. If anyone wants a copy, PM and I will provide it (assuming SitePoint will not object - albeit free, it is under their copyright) to you.

I have the same STELLAR service from WebHostingBuzz across a shared account, a specialized (Joomla) hosting account and a dedicated account. The staff there are on top of every request very quickly and take the time to explain their resolution to me (always eager to learn despite being an old dog).

[indent]If you can, get your support team to install (and configure) maldet. It’s an application which will perform a nightly (CRON) scan of your webspace (depth adjustable) for any malware (JS insertions to PHP scripts) which may have crept in via an undetected/unmonitored crack in your security. It’s great for giving you peace of mind - as well as detecting, correcting or quarantining and notifying you of any problems which may have crept onto your server.


My mother had a pair of lots at the Camplands just north of Andover and spent her summers there on their private lake. Andover is miles from civilization so she couldn’t get ADSL there but she loved the area, the people and her “summer home” (tornado magnet). Unfortunately, she passed away there in 2009. I’d visited her there a couple of times and found the area … nice … quaint … and a LONG way from anywhere! :lol:

I learned my HTML coding using HotDog too many years ago to admit to. I kept away from the WYSIWYG “junk” as their code was crap and, as you discovered, M$ crapware injected proprietary code in everything (talk about bloatware, too!).

I got that book, too, but found that knowing exactly what you want from a website enables you to create your website (especially using PHP include statements for the standardized parts like the masthead, navigation and footer) very precisely. I’m using Dreamweaver (CS5 Master Suite) but rarely am in the Display mode as the code mode is far more efficient. It does allow me to create test sites locally, too, which is very handy (you still have to edit the hosts and httpd-vhosts.conf files).

On topic:

If you’re still having problems, please PM with a link to the program you’re using and I’ll try to sort though the thing for you.