I'm trying to password the phpMyAdmin folder of my site. I've created the .htaccess file as follows:


AuthName "PHP MyAdmin"
AuthType Basic
AuthUserFile /usr/home/mysite/public_html/phpmyadmin.htpasswd

require valid-user

Can anyone tell me how to create the .htpassword file? And is there anything else that needs to be done?

Cheers,

    I can't access the command line of my remote host - is this still possible to do from my end?

      You can encrypt your own passwords with the crypt() function and write the .htpasswd file in the form:

      username:encrypted_passwd
      username:encrypted_passwd

      If you don't want to write your own encryption functions for this then you can use the Htpasswd class for php, I don't know the exact URL but you can easily do a google search for it.

        Write a Reply...