Welcome to Geeklog Thursday, August 22 2019 @ 10:57 pm EDT

Geeklog Forums

.htaccess tied to Geeklog


I have certain html files that can not be accessed by the public. I have them secured with .htaccess at the moment. Is there a way that I could tie the usernames of Geeklog to the htaccess file so that when they log into Geeklog they would be able to access those files. This would allow for much easier administration instead of keeping up with multiple username and passwd files.


Have you tried playing with the auth_mysql module for Apache? I haven't tried it myself, but I think you could get it to do what you want (by making it use GeekLog's users table).

Status: offline


Forum User
Registered: 19/03/02
Posts: 2
I have the same scenario...I want a members only section. I added the following to the top of my php/html page include_once('lib-common.php'); if ($_USER['uid'] > 1) { $email = $_USER['email']; $uname = $_USER['username']; do the stuff members are allowed to do } else { go away...noboby wants you herre! } -- Mike
-- Mike


Which php page? Your header?


You'll find all you need to know about HTTP authentication with PHP <A HREF="http://www.php.net/manual/en/features.http-auth.php">in the PHP manual</A>; instead of using .htaccess or .htpasswd at all, it's possible to do it entirely within PHP.


How do I find the tables and field names that hold the username and password info for authentication. Also could I use something like the authentication built inot Geeklog to give permission to a page. I notice only the user block appears when I am logged in.

Status: offline


Forum User
Registered: 27/01/03
Posts: 16
i wonder if you could tweak this script here: http://membership.cgi-central.net/scripts/amember/free.php
------ my geeklog discussion is at: http://ironfeather.com/cgi-bin/bbs/ikonboard.cgi?act=SF;f=20

All times are EDT. The time is now 10:57 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content