Multiple .htpasswd files?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • [Labret]
    Registered User
    • May 2001
    • 10945

    #1

    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?
    Last edited by [Labret]; 06-04-2002, 04:51 PM.
  • freeones
    Confirmed User
    • Jul 2001
    • 3406

    #2
    Yes it is possible and not hard to create
    I even could do it myself

    The new FreeOnes! - AdultFilmStarContent - BabeGalleries and much more! - 1Strike Movies and much more! All powered by Xpressa

    Comment

    • [Labret]
      Registered User
      • May 2001
      • 10945

      #3
      Yeah, thanks.

      Anywho...

      found a solution.

      Throw this on a cron. Problem solved.

      http://realtimescripts.com/freescripts/merge/merge.pl

      Comment

      • Big E
        Registered User
        • Mar 2002
        • 935

        #4
        Labret - use AuthMysqlDB instead.. faster, easier and much more flexible.

        Comment

        • salsbury
          Confirmed User
          • Feb 2002
          • 1070

          #5
          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>.
          Last edited by salsbury; 06-05-2002, 08:13 AM.

          Comment

          • TFCash
            Confirmed User
            • Apr 2001
            • 1738

            #6
            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


            Tim
            TeenFlood.com Online since 1998.

            TFCash KissMeGirl
            VirginRiches MondoBucks

            tim at tfcash.com or submit a ticket at our HelpDesk

            Comment

            • Kimmykim
              bitchslapping zebras!!!!!
              • Jun 2001
              • 16015

              #7
              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...

              Comment

              • SinEmpire
                Confirmed User
                • Nov 2001
                • 9813

                #8
                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
                President at MojoHost | brad at mojohost dot com | Skype MojoHostBrad
                71 industry awards for hosting and professional excellence since 1999

                Comment

                • nuclei
                  old school fart
                  • May 2001
                  • 1015

                  #9
                  Originally posted by SinEmpire
                  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

                  I know they have email spammed me quite a few times...
                  The next generation of SEO

                  Comment

                  Working...