Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: accessing / authenticating user/pass through .htpasswd  (Read 2844 times)

0 Members and 1 Guest are viewing this topic.

bit bit spears

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 240
    • TangibleBrit.com
accessing / authenticating user/pass through .htpasswd
« on: March 29, 2004, 01:41:16 am »

Ok, i scrunged up this code to produce an htaccess password login screen, but am having trouble coding it into coppermine, any ideas?

Code: [Select]
<?php 

// --------- DATABASE INFORMATION --------- 
$USER "user"
$PASS "pass"
    
function 
error &#40;$error_message&#41; &#123; 
   
echo $error_message."The information you have entered does not match the information in our database please try again."
   exit; 
&
#125; 
if &#40; &#40;!isset&#40;$PHP_AUTH_USER&#41;&#41; || ! &#40;&#40;$PHP_AUTH_USER == $USER&#41; && &#40; $PHP_AUTH_PW == "$PASS" &#41;&#41; &#41; &#123; 
   
header&#40;"WWW-Authenticate&#58; Basic entrer=\"Form2txt admin\""&#41;; 
   
header&#40;"HTTP/1.0 401 Unauthorized"&#41;; 
   
error&#40;""&#41;; 
&#125;

?>

Logged

Weps

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: accessing / authenticating user/pass through .htpasswd
« Reply #1 on: June 20, 2004, 03:35:56 pm »

I would also like to use a htaccess protection, synchronized with the coppermine users database.  So if you enter the user information in de the htaccess password box, you should be logged in in coppermine.  Is this possible?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: accessing / authenticating user/pass through .htpasswd
« Reply #2 on: June 20, 2004, 04:15:42 pm »

There's a reason why nobody answered tb's thread in the first place. After all, things are not that easy, so for now it's just wishfull thinking.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 14 queries.