Forum Moderators: phranque
I'm trying to build my own little site. It's been going pretty well so far. I've built the site, did all the graphics, links all working etc..... .. . .. however... .. .......... onto the tricky bit!
How on earth do I make the .htaccess file call up the pop up window?
The username and password pop-up appears with "AuthUserFile /dev/null" (no inverted commas) so my server does support .htaccess. I am using blueyonder by the way. Problem is that when I change /dev/null to the actual unix path of the .htpasswd file all I get is redirected to a 403 forbidden standard page without any pop ups. Can't understand it! I've been pulling my hair out trying to get it to work!
PLEASE HELP!
Laura x
[edited by: jatar_k at 4:25 pm (utc) on Jan. 21, 2004]
[edit reason] see TOS [webmasterworld.com] [/edit]
Try this:
[javascriptkit.com...]
Just called them there and asked them if they can tell me my complete virtual host path and they told me that they 'dont store that information' and that that information is only available to me through my 'FTP client'.
If he means through Dreamweaver then dreamweavers site manager window shows the root directory as /htdocs. There is nothing showing above that?
Any ideas?
when I open the page I get a little table containing:
Configuration File(php.ini)Path: /usr/local/lib/php.ini
Does that mean that I should change to AuthUserFile /usr/local/lib/htdocs/MEMBERS/.htpasswd
?
THANKS guys, you've been a brilliant help so far! I have a feeling you're gonna crack this problem for me!
Does that mean that I should change to AuthUserFile /usr/local/lib/htdocs/MEMBERS/.htpasswd
No - that's not the one you want - somewhere near the bottom of that page, you'll see the path to the actual script:
/something/x/x/phpinfo.php
That's the one you want.
<edit> look for SCRIPT_FILENAME </edit>
in the output of your phpinfo.php script, take a look for the following environment or php variables:
- PATH_TRANSLATED
- SCRIPT_NAME
- SCRIPT_FILENAME
one of these should exist at least if php is running as cgi. they will contain the complete path, so you can get what you're looking for.
hope this helps,
-hakre
You've helped me establish the complete virtual host path and now I am getting somewhere! The popup is appearring now!
HOWEVER! When I type in the password it's not having it! It's just letting me enter it 3 times and then giving me a forbidden error now
:-(
You'd think they could make this sort of thing easier eh? Especially consodering the amount of amateur sites out there?!
Anyway, any ideas? I've followed a lot of sites word for word in creating the .passwd file and it looks something like this:
laura:LefWrvTBNTQg2
What have I done wrong now please guys?
<edit> Nevermind looks like you got it finally. Your htpasswd file looks normal, you just need to make sure the permissions are 644 and you are pointing to the correct dir that the .htpasswd file is in. </edit>
[edited by: RussellC at 5:27 pm (utc) on Jan. 21, 2004]
When I read back on this thread there's no way I'd have been able to get my members area working without you guys! THANK YOU SO VERY MUCH!
Do you want the address of the site so you can check me out? It's far from finished but at least thanks to you all I have a good framework and can get started on the members area now!
THANK YOU THANK YOU THANK YOU
LAURA ****xxx
Anyway, any ideas? I've followed a lot of sites word for word in creating the .passwd file and it looks something like this:laura:LefWrvTBNTQg2
What have I done wrong now please guys?
if it's a *nix system, this should be right. if it's a win32 system, you need to create the 'passwordcrypt' with an algorythm called md5. the tool which was promoted on top of this page can handle both. it will take the default for the system it's running on. so if you execute it on the server (if you can), then it should create the right hash for your password. a hash is the value after laura: called: LefWrvTBNTQg2
-hakre