Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 20-12-03
Registered User
 
Join Date: Aug 2003
Location: Great Yarmouth, UK
Posts: 573
Thanks: 0
Thanked 0 Times in 0 Posts
Freebie is an unknown quantity at this point
  htaccess & mysql

I want to use htaccess to restrict access to a site. The site has many members, so i want htaccess to work with the existing members mysql database.

I've looked around, and found a solution using the mod_auth_mysql module, but my host says i can't use this, some reason to do with apache.

How else can i do it? By hand for each member is not an option. Help would be appreciated here as everything else i find in google goes way over my head.

Cheers in advance

Carl
__________________
Freebieholics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 20-12-03
999gi's Avatar
aka Antony
 
Join Date: Aug 2003
Location: Bristol
Posts: 971
Thanks: 0
Thanked 0 Times in 0 Posts
999gi is an unknown quantity at this point
Not sure exactly what you are trying to do but cant you just have a script on each page thats restricted that checks the members details and redirects them if they are not authorised.

Presumably you already have a members login area anyway so I guess you're looking to do soemthing else but Im not sure what.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 20-12-03
Registered User
 
Join Date: Aug 2003
Location: Great Yarmouth, UK
Posts: 573
Thanks: 0
Thanked 0 Times in 0 Posts
Freebie is an unknown quantity at this point
That's what i do at present, and it's fine for the number of pages in the members section at present.

However, we want to be able to control 100's of pages in a logged in area. This area will cover several directories of files. I would rather a way to do that without having to modify all pages.

Then, i'm also unsure about an effect that may or may not be caused, and i'd like to be able to quickly unlock seperate, or all areas quickly.

htaccess just seemed the logical tool to be using, but the number of users involved makes manual usage impossible.

I would also gain this way as i wouldn't need to send a member identifier from page to page.
__________________
Freebieholics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 20-12-03
Senior Member
 
Join Date: Sep 2003
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
matbennett is an unknown quantity at this point
Is there not a general include in the pages that you can add the authentication code to?

If so, you could also store the login as a session variable in that include so there would be no need to modify the rest of the pages.

As far as I am aware, there is no way for the http_auth routines to get the password details from mySQL. You can do it the other way around though: Force everyone to log in, so that you have the http_auth information and then peform the relevant checks on each page. This would still require modfiying all the pages though, so I don't see that it would give any advantage.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 20-12-03
Registered User
 
Join Date: Aug 2003
Location: Great Yarmouth, UK
Posts: 573
Thanks: 0
Thanked 0 Times in 0 Posts
Freebie is an unknown quantity at this point
Quote:
Is there not a general include in the pages that you can add the authentication code to?
The site in places shows my progression with coding. It started as very simple html, and has been converted on the fly to php. I've done what needed to be done to make the site work as new things have been added. If i started from scratch, with my knowledge as it is now, it would be very different.

Looks like we're about to gain a bunch of header includes....

Thanks for your thoughts.

Anyone else any ideas before i commit myself?
__________________
Freebieholics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 20-12-03
Senior Member
 
Join Date: Sep 2003
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
matbennett is an unknown quantity at this point
Maybe I am just a nervous programmer (or a bad one), but with PHP I generally have a catchall include at the top of every document from the outset (covermyass.inc.php or similar).

This gives me a bit of slack as my poorly thought out project comes together and I suddenly realise that I need a batch of functions and variables that I hadn't previously thought of.

Not sure if this would be seen by most as "good practice" but it has saved me a lot of bother in the past.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 21-12-03
Registered User
 
Join Date: Aug 2003
Location: Great Yarmouth, UK
Posts: 573
Thanks: 0
Thanked 0 Times in 0 Posts
Freebie is an unknown quantity at this point
We do have a general include in the top of every page, and a call to the config file. The problem is that i mean every page, and i don't want to protect every page, just every page in 3 directories. This is why i originally thought htaccess would be the answer.

At least if i update every page to be included to include the new include now (LOL), we will be in a better position when future ideas come along.

At least i'm not chasing my own tail anymore :O)
__________________
Freebieholics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #8 (permalink)  
Old 21-12-03
Paul Knapp's Avatar
Registered User
 
Join Date: Aug 2003
Location: Kent
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Paul Knapp is an unknown quantity at this point
Try this Membership Manager http://www.groundbreak.com/products.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 21-12-03
Registered User
 
Join Date: Aug 2003
Location: Great Yarmouth, UK
Posts: 573
Thanks: 0
Thanked 0 Times in 0 Posts
Freebie is an unknown quantity at this point
Thanks for the suggestion Paul.

Looks to me like this relies on an internal mysql database, rather than connecting to an existing one with user definable fields. So to use this i think i would have to export from the current database to a text file, and then import into the manager. I need a solution that's live with the existing members database. I want to set it up and forget about it.
__________________
Freebieholics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MYSQL loading JohnC Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 1 07-02-05 03:02 PM
Connect to MySql on a remote server? accelerator Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 3 07-01-05 04:54 PM
Anyone anygood with xml, php, mysql and Affiliate Window AnnonnyMouse The Affiliate Marketing Lounge 1 23-09-04 11:00 AM
MS Access & mySQL Frostie Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 5 04-10-03 10:46 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7