vilain Posted June 8, 2006 Share Posted June 8, 2006 Hello,Here is the deal. I want to be able, from PHP, to set $PHP_AUTH_USER and $PHP_AUTH_PW so that the authentication window wont pop up when accessing the protected (with .htaccess) directory. The authetication is done with PHP, so I don't want to have to enter a user name and password again when I access the directory.My code looks like this but it won't work. This code is executed in a non-protected directory and then it gets redirected to a protected directory (projectPath). $PHP_AUTH_USER = $user; $PHP_AUTH_PW = $pass; session_start(); session_register("PHP_AUTH_USER"); session_register("PHP_AUTH_PW"); header( 'Location: ' . $_SESSION['projectPath'] ); exit;Someone managed to do that already?Thanks. Link to comment https://forums.phpfreaks.com/topic/11521-php-htaccess-and-no-authentication-window-popup/ Share on other sites More sharing options...
rafdre Posted June 20, 2006 Share Posted June 20, 2006 Hello,I have the same problem...so I you have solution, please keep me posted.regardsRafal Link to comment https://forums.phpfreaks.com/topic/11521-php-htaccess-and-no-authentication-window-popup/#findComment-47781 Share on other sites More sharing options...
mainewoods Posted June 21, 2006 Share Posted June 21, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version.[/quote][a href=\"http://www.php.net/manual/en/features.http-auth.php\" target=\"_blank\"]http://www.php.net/manual/en/features.http-auth.php[/a] Link to comment https://forums.phpfreaks.com/topic/11521-php-htaccess-and-no-authentication-window-popup/#findComment-47887 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.