You are on page 1of 3

Adobe Dreamweaver & Dreamweaver Developer Toolbox : Tutorial: Login tables: installation & configuration

24/01/2015

Gnter Schenk :: Tutorials Corner


Adobe Dreamweaver Developer Toolbox

Login tables: installation & configuration


Author: Gnter Schenk, Added: 16.12.2007, Updated: 09.01.2008

Table Of Contents
Title

Version

Installing the database tables n/a


Configuring the Login settings n/a

1. Installing the database tables


1.1. Introduction
One of the most frequently asked questions by Dreamw eaver Developer Toolbox new bies on the ADDT forums is :: w hat
the heck is the required structure of ADDTs login tables supposed to be like, and how do I set this thing up ? Regretfully
the current ADDT helpfile does leave folks in the dark about this, so heres a complete SQL dump for you to use w ith your
favorite database management tool like e.g. phpMyAdmin:
C REATE TABLE `login` (
`id` int(3) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(70) NOT NULL default '',
`email` varchar(150) NOT NULL default '',
`active` tinyint(4) NOT NULL default '1',
`level` int(2) NOT NULL default '0',
`random_key` varchar(200) default NULL,
`login_attempts` smallint(6) NOT NULL default '0',
`disable_date` datetime NOT NULL default '0000-00-00 00:00:00',
`registration_date` datetime NOT NULL default '0000-00-00 00:00:00',
`expiration` int(11) NOT NULL default '100',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INC REMENT=1 ;
C REATE TABLE `login_stats` (
`id` int(11) NOT NULL auto_increment,
`id_log` int(11) NOT NULL default '0',
`ip_log` varchar(15) NOT NULL default '',
`last_logindate_log` datetime NOT NULL default '0000-00-00 00:00:00',
`last_activitydate_log` datetime default NULL,
`session_log` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INC REMENT=1 ;

As you might note, the abovementioned columns have on purpose been w idely named according to the various dropdow n
menus available from w ithin ADDTs Login Settings (see "Control Panel") -- this should enable you to instantly assign the
corresponding table columns w ithout having to w onder w hat belongs w here ;-)
1.2. some notes on the provided SQL script:
i. this SQL dump w ill exclusively w ork for a MySQL database, means you w ill have to setup the table columns manually
w hen using a different DBMS -- doing this shouldnt be too hard nonetheless, as e.g. Microsoft Access users
should be able to understand the meaning of terms like "varchar", "int" just fine.
ii. the given column names are safe and w ill w ork, its been successfully tested a 1000 times. If you really need to
rename the columns to something else, just go ahead -- but you need to be aw are of one particular pitfall :: a
column named user w ill definitely be messing up ADDTs configuration file, because this very term happens to be (a
yet undocumented "feature") one of Dreamw eavers "reserved w ords" thats internally used for other stuff and w ill
lead to a naming conflict.
iii. it doesnt use any fancy stuff like "collations" or (in this context certainly needless) character set definitions, means it
w ill install just fine on older versions like 3.23.xx. If youre not using the "MyISAM" type at all, please change this
after installing the tables.
iv. the "login_stats" table is only required respectively supported w hen using ADDTs PHP_MYSQL server model. The
same goes for the last four columns (login_attempts, disable_date, registration_date, expiration) of the main "login"
table, w hich are mapped to the "Restrictions" tab and are currently only available on PHP_MYSQL as w ell
v. in case youre planning to use the "Encrypt Passw ord" option (see the "Options" tab), your login tables "passw ord"
should definitely provide a "varchars" value of 32 chars. As ADDT is using the
MD5 encryption of passw ords,
defining a low er varchars value w ill be truncating the encrypted passw ord.
vi. ColdFusion users: w hen loading the login table, Dreamw eavers (including the CS3 version) w ill confront you w ith a
funny bug w hich makes it return the w arning message - "sql type not recognized: int unsigned" -- w hat does it mean
?
According to my fellow Community Expert Ken Fords reply on this forum: "That is usually caused by your MySQL
table having a field w ith a int type and an unsigned attribute. DW just does not recognize the unsigned attribute. If
you w ant it to stop, just removed the unsigned attribute from the field in the database" -- w hich in our case in the
"id" column. Thanks Ken :-)
1.3. Installing the tables with phpMyAdmin
http://guenter-schenk.com/tutorials/tutorial.php?id=1#toc2

1/3

Adobe Dreamweaver & Dreamweaver Developer Toolbox : Tutorial: Login tables: installation & configuration

24/01/2015

Any halfw ays feasible database administration tool installed on your local or remote server should provide an "insert SQL
data" feature -- the follow ing example is based on the popular phpMyAdmin thats usually available on ordinary
PHP/Apache hosts
a) open phpMyAdmin and click the SQL icon usually located on top of the left frame:

b) the subsequently opened brow ser w indow w ill display a blank textarea aw aiting some input. Just paste the provided
SQL dump in here...

... and confirm w ith OK to get the tables installed. Thats all there is to do, phpMyAdmins list of installed tables w ill now
refresh and display the new ly installed login tables.

2. Configuring the Login settings


Now that the login tables have been added to your database, its time to to configure ADDTs Login settings:
a) open ADDTs Control Panel
b) click the "Login settings" button
c) click the "Database" tab and specify the "database information" as displayed next:

d) PHP_MYSQL server model only: click the "Restrictions" tab and specify the "login policy" and "account expiration
settings" as displayed next:

http://guenter-schenk.com/tutorials/tutorial.php?id=1#toc2

2/3

Adobe Dreamweaver & Dreamweaver Developer Toolbox : Tutorial: Login tables: installation & configuration

24/01/2015

e) PHP_MYSQL server model only: click the "History" tab and specify the "user history options" as displayed next:

Copyright Note:
This tutorial and all related material (files, images etc) are licensed under a
C reative C ommons Attribution-Noncommercial-Share Alike 3.0 Unported License
Contact:
info @ guenter-schenk.com

http://guenter-schenk.com/tutorials/tutorial.php?id=1#toc2

3/3

You might also like