mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #27790
[Bug 1474659] Re: Leap2a: import/leap/lib.php:1117 unserialize: Error at offset 65512 of 65535 bytes"
This problem only occurs if:
1. You are using MySQL
2. You are doing self-import (interactive import), not the admin's
"import into a new account" option.
3. Your export includes a page which is more than 65 kilobytes in size,
when serialized. (not including file attachments)
The problem occurs because one of the steps during the interactive
import process is to serialize the page, and store the serialized page
in the database. The serialized page goes in the
"import_entry_requests.entrycontent" table in the database. This table
is the "text" data type, but because we didn't specify a size, in MySQL
it defaults to being a standard TEXT field, which has a limit of 65,536
bytes. Attempts to insert values longer than that, are simply truncated
to 65,536 bytes.
So what happens is, the page is serialized into a big long string
greater than 65,536 bytes in length. It's inserted into the
import_entry_requests.entrycontent column. Then once you make all your
import decisions and submit that, we try to pull the page back out of
import_entry_requests.entrycontent and unserialize it. We retrieve the
truncated value from the database, try to unserialize it, and the call
to unserialize() fails because the truncated string lacks a closing
quotation mark and bracket.
The fix here is to expand the size of the import_entry_requests column
to a LONGTEXT, which can hold up to 4GB of text. That should be enough.
** Also affects: mahara/1.9
Importance: Undecided
Status: New
** Also affects: mahara/15.10
Importance: Undecided
Status: New
** Also affects: mahara/1.10
Importance: Undecided
Status: New
** Also affects: mahara/15.04
Importance: Undecided
Status: New
** Changed in: mahara/1.9
Status: New => Won't Fix
** Changed in: mahara/15.04
Status: New => Won't Fix
** Changed in: mahara/1.10
Status: New => Won't Fix
** Changed in: mahara/1.10
Importance: Undecided => Medium
** Changed in: mahara/1.9
Importance: Undecided => Medium
** Changed in: mahara/15.04
Importance: Undecided => Medium
** Changed in: mahara/15.10
Importance: Undecided => Medium
** Changed in: mahara/15.10
Status: New => In Progress
** Changed in: mahara/15.10
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/15.04
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/1.9
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/1.10
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/15.10
Milestone: None => 15.10.0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1474659
Title:
Leap2a: import/leap/lib.php:1117 unserialize: Error at offset 65512 of
65535 bytes"
Status in Mahara:
In Progress
Status in Mahara 1.10 series:
Won't Fix
Status in Mahara 1.9 series:
Won't Fix
Status in Mahara 15.04 series:
Won't Fix
Status in Mahara 15.10 series:
In Progress
Bug description:
This bug was reported by Kwantlen Polytechnic.
The problem they were experiencing was that some leap2a files error
out when they're attempted to be imported. With error-reporting turned
on, the same message is always present:
[WAR] f7 (import/leap/lib.php:1117) unserialize(): Error at offset 65512 of 65535 bytes
Call stack (most recent first):
log_message("unserialize(): Error at offset 65512 of 65535 byte...", 8, true, true, "/var/www/mahara-15.04.1/import/leap/lib.php", 1117) at /var/www/mahara-15.04.1/lib/errors.php:441
error(8, "unserialize(): Error at offset 65512 of 65535 byte...", "/var/www/mahara-15.04.1/import/leap/lib.php", 1117, array(size 5)) at Unknown:0
unserialize("a:11:{s:5:"title";s:40:"Occupational health and sa...") at /var/www/mahara-15.04.1/import/leap/lib.php:1117
PluginImportLeap->render_import_entry_requests() at /var/www/mahara-15.04.1/import/leap/lib.php:269
PluginImportLeap->build_import_entry_requests_form() at /var/www/mahara-15.04.1/import/index.php:225
print_import_items_form() at /var/www/mahara-15.04.1/import/index.php:73
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1474659/+subscriptions
References