Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Update lti2_nonce value varchar size on wikiΒ #38

@senyah

Description

@senyah

I'm new at this but I struggled for longer than I'd like to admit to make this library work for me. After plugging in lots of print statements, among other things, I discovered this error PDOStatement::execute(): SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'value' at row 1 in <FILE_PATH>. Apparently the nonce value being sent from my test instance of Canvas was 43 characters long. I'm not sure if there is a way to limit the size sent from Canvas, but I ended up increasing the value varchar(32) size to varchar(255) in the lti2_nonce table.

I imagine others using this library will, or already have, encountered this but I'd like to have the wiki updated to help others in the future.
Here is the place on the wiki: https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP/wiki/Installation#mysql

Here is the section I'm referring to:
CREATE TABLE lti2_nonce (
consumer_pk int(11) NOT NULL,
value varchar(32) NOT NULL,
expires datetime NOT NULL,
PRIMARY KEY (consumer_pk, value)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

I propose changing the third line to value varchar(255) NOT NULL, or some other size greater than 32.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions