corner  
 products
 download
 subscription downloads
 purchase
 help
 reference links
 support
 search
 faq
 home
 projects
Scripts
 psManager
 
 psDelimited
 
 psMembers
 
 Report Tools
 
 Forum
 
 credit cards
 
 shopping cart
 
 UPS shipping cost
 
 UPS shipping address
 
 Amazon Associates
 
 html help
 
 html email
 
 psViewer
 
 psBanner
 
 psSiteSearch
 
 PGP email
 
 eCards
 
corner    

Perl Studio for Windows 95/98/2000/NT

Perl Studio psMembers

Perl Studio psMembers is a set of Perl scripts that:
Allows users to sign-up for a members database.
Password protect members directory.
Admin scripts to add, update, delete records in members online database.
Admin script routines to update password protected .htpasswd file with current list of members that are approved to use the members password protected directory.
Admin script routines to modify the number of days that a user is allowed to enter the members password protected directory.
User scripts to allow the users to update their user information and password.
   

Requirements: Unix/Linux/MySQL.

psMembers example login

M embers Login
Please click on the button below to enter the Members Only Area. A "pop-up" box will appear asking for your user name and password. Please enter the user name and password issued to you at the time of registration. If you are not a member, you will not be able to access the members only area. If you are a member, and are not able to access the members only area, please contact us at support@no_spam_email_address.com.


Attention non members
In order to access the members area, you must first become a member. For more information on becoming a member , please use the member signup form here .

L ogin to edit and update your member information or use the signup form here to be come a member.
 

member login

 


please enter your username and password.

  username:

  password:

 

   

  Forgot your password?

  e-mail address:

 

users admin | members admin

username and password for demo admins.
username: admin
password: admin


How to tie the psMembers script into the shopping cart scripts.

Enter the url to the store members page at the top of the psMembers join.cgi script
my $purchase_url = "http://$ENV{HTTP_HOST}/cgi-bin/store/members.cgi";
Set $auto_approved ='pay'; in the psMembers users_params.cgi script to send the user to the store/members.cgi script, if you want your users to purchase your member subscription. If you do tie the two scripts together then you will have to enter a product in the store products database table and set the category to members.


Installing Perl Studio psMembers scripts , DBI::SQL version

Unzip the psmembers.zip archive file on your local hard drive.

Change the first line of the scripts to point to the correct path for perl version 5 or greater on your server.

The default perl path in the scripts is #!/usr/local/bin/perl
other possible paths to perl
#!/usr/bin/perl
#!/usr/local/bin/perl5

psMembers script files
cgi-bin/users/join.cgi
cgi-bin/users/update.cgi
cgi-bin/users/members_create.cgi
cgi-bin/users/users_create.cgi
cgi-bin/users/members_import.cgi
cgi-bin/users/users_import.cgi
cgi-bin/users/members_admin.cgi
cgi-bin/users/users_admin.cgi
cgi-bin/users/members_params.cgi
cgi-bin/users/users_params.cgi
cgi-bin/users/mysql_lib.cgi

(note: The script files params.cgi and mysql_lib.cgi do not need a perl path tag.)

Upload all the script files into your cgi-bin directory.

Create a 'users' directory under your public_html directory and cgi-bin directory.

psMembers html template files
/users/join.html
/users/success.html
/users/update.html
/users/update_success.html
/users/members_print.html
/users/users_print.html

Upload the html files into the public_html users directory. The member_print.html and users_print.html files are used to print database records by the admin scripts.
Modify the html files to reflect your web site design. Edit the form action tags to point to the script files on your server.
The template files display error messages by replacing the hidden html tags with the error messages returned by the script file.
Hidden html tag: <!--error_message-->
Make sure you have the hidden html tags in your template files after you edit the template files to reflect your web site design.

The template files are read and displayed by the script files. None of the template files should be displayed directly to the user. The scripts use the standard bracket replacement routine to replace the item in brackets with database or user input information.
example:
<input type="text" name="username" value="[username]" size="20">
will be replaced with
<input type="text" name="username" value="my_user_name" size="20">

Create a 'members' directory under your public_html '/users' directory .

psMembers access files
/users/members/.htaccess
/users/members/.htpasswd
/users/members/index.html

Upload the access files into the public_html '/users/members' directory.
Modify the .htaccess file to reflect the location of the your .htpasswd file.
AuthUserFile /home/sites/myuserid/users/members/.htpasswd
AuthGroupFile /dev/null
AuthName Perl Studio Members Demo
AuthType Basic
require valid-user

Next, make sure the files have the correct permissions. Script file permissions should be 755.

The .htpasswd file should be writeable by the scripts. (chmod 666)

Always have an index.html file in your password protected directory, to prevent the browsers from displaying your .htpasswd file while displaying an directory index to users or search engine robots.

User Modifications


The following lines from the params.cgi file define the location of important files and database parameters. These lines must be modified before running the scripts:

Required Modifications that need to be set before you use the scripts


Access to your DBI::SQL Database will require that you supply your userid and password
$dbuser = 'your user id';
$dbpass = 'your password';

Access to your DBI::SQL Database will require that you supply the name of your database,
usually the same as your userid
$dbname = 'your database name';

The name of the database driver your using. It can be mysql or any DBI:DBD driver
$dbdriver = 'mysql';

The URL to the database server, usually localhost, if the database server is on the same machine.
$dbserver = 'localhost';

Edit the number of days before a members usernames/passwords are expired from the members database and the .htpasswd file.

$members_day_to_expire = 365;
	
#enter the name of the members database
$dbtable_members = "members";

#   set $auto_approved to 'no' if you want to approve the user records manually
#   set $auto_approved to 'yes' to automatically approve the user record information
#   for submission to the members database  to allow the user immediate access to the
#   password protected directory.

$auto_approved ='yes';

#enter the system path to  the file that usernames/passwords are stored in.
# the file must have a file permission of 664 or 666

$htpasswd_file = "$ENV{DOCUMENT_ROOT}/users/members/.htpasswd";

# (a two-character string from the character set [./a-zA-Z])  for unix crypt function
$salt= 'Pq';

	
$MembersTemplate = "$ENV{DOCUMENT_ROOT}/users/join.html";
$MembersUpdateTemplate = "$ENV{DOCUMENT_ROOT}/users/update.html";
$MembersTemplate_success = "$ENV{DOCUMENT_ROOT}/users/success.html";
$MembersUpdateTemplate_success = "$ENV{DOCUMENT_ROOT}/users/update_success.html";

$members_edit_url = "/cgi-bin/users/update.cgi";

$WebSiteName = "My members directory";
		
		

First run the members_create.cgi and users_create.cgi script files to create your new members and users database table.
You can now load the join.cgi script and enter your user information.
Load http://yourserver/cgi-bin/users/join.cgi (replace 'yourserver' with your own server name) in your browser and make sure it functions correctly.


Customizing the fields in the users database table.

You can change the fields in the users database table, but the users database table must retain the following fields.

  • EntryDate
  • RecordID
  • username
  • password
  • email
If you do customize the filds in the users database table, you will also need to edit the template files to reflect the new fields in the users database table.

products| purchase | download | subscription downloads
help | reference | support | search | faq | home

Perl Studio Home Page © Copyright 2001 AyerSoft Company