I tried using this on a server with mysql 4.x, and got this:

user warning: Column length too big for column 'policy' (max = 255); use BLOB or TEXT instead query: CREATE TABLE password_policy ( `pid` INT NOT NULL auto_increment, `name` VARCHAR(64) NOT NULL DEFAULT '', `description` VARCHAR(255) DEFAULT '', `enabled` TINYINT NOT NULL DEFAULT 0, `policy` VARCHAR(1024) NOT NULL DEFAULT '', `created` INT NOT NULL DEFAULT 0, `expiration` INT DEFAULT NULL, `warning` VARCHAR(64) DEFAULT NULL, PRIMARY KEY (pid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/xxxxx/domains/example.com/html/includes/database.inc on line 515.

Apparently, mysql versions prior to 5.03 limit the length of a varchar database column to 255 characters.

I suggest the password_policy documentation reflect this requirement.

Comments

miglius’s picture

Assigned: Unassigned » miglius
Status: Active » Fixed

I have changed the db field to a 'text', which should work with a 4.x version.

andrewbenkard’s picture

Sounds promising; thank you for all your work on this module.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

iva2k’s picture

Status: Closed (fixed) » Active

Code for 6.x-1.x-dev 2009-Feb-02 does not have that change (TEXT for db field). Reopening.

miglius’s picture

It says 'text':

 74         'policy' => array(
 75           'description' => t("The policy's serialized data."),
 76           'type' => 'text',
 77           'not null' => TRUE,
 78           'default' => '',
 79         ),
miglius’s picture

Status: Active » Postponed (maintainer needs more info)
iva2k’s picture

I was looking at the tarball.

Code for 6.x-1.x-dev 2009-May-13 seems to be OK. Meanwhile, I moved from ISP with MySQL 4.0 to 5.0 and cannot re-verify. Yes, part of the move was due to incompatibility with some of the modules ;)

miglius’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.