![]() |
Multiple .htpasswd files?
I have a members section than needs to share two seperate .htpasswd files.
I have tried specifying two seperate AuthUserFile in the .htaccess but not go. Only reads the first one listed. Is it possible to have the .htaccess check two seperate .htpasswd files? |
Yes it is possible and not hard to create
I even could do it myself :) |
Yeah, thanks.
Anywho... found a solution. Throw this on a cron. Problem solved. http://realtimescripts.com/freescripts/merge/merge.pl |
Labret - use AuthMysqlDB instead.. faster, easier and much more flexible.
|
careful with the cron solution, if it's the one i've seen before, it's wiped out many a .htpasswd file.
what a lot of programs fail to do is test to see if what they think they wrote out to a file actually made it there. this is unbelievably common. say for example your drive is somehow full (hey, shit happens). your script opens up the merged .htpasswd file and truncates it to 0 bytes, as is normal. then it starts trying to write to it. it doesn't check if the writes succeed. it doesn't matter though, since the file is already truncated, the data is lost. i've seen this kind of code in ccbill's scripts and the pwmerge scripts out there, amongst others. what scripts need to do is write out to a temporary file, keeping track of how many bytes it thinks its writing out. then, compare the size of the temporary file to the number of bytes. if it's right, rename the temporary file to the real file (ie mv .htpasswd.tmp .htpasswd). if you need help with this hit me up via <a href="mailto:[email protected]">email</a>. |
Labret -
Why don't you just have both billing companies use the same password file ?? All of the billing companies that we have setup for our clients have a check to see if the username is already in the password file, so you won't have to worry about them having the same usename in both password files that way :) just my :2 cents: Tim |
Hmmm your billing companies should be able to help you out if that's where the issue is coming from.
If we happen to be one of them, well, you know who to call... |
Hey Labret read my other thread, how timely. The company selling scripts that I was asking about has a cool looking product that appears to do that.
http://www.paysitepowertools.com/ Anyone know if these guys are legit? There's no real contact info or names anywhere on the site. Brad |
Quote:
I know they have email spammed me quite a few times... |
All times are GMT -7. The time now is 01:39 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123