Help - Search - Members - Calendar
Full Version: Perl 5.8.4, Storable.pm byte order problem
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Shawn Y
Hi all. I upgraded to Perl 5.8.4 last week, and (only after the fact) realized that the default byte order is now 64-bit, if I understand correctly. Being no kind of Perl guy, there may be something I've done incorrectly, but the below error now gets spat into my Apache error log every time I load an MT admin page. I'm running MT 3.0D.

CODE
Byte order is not compatible at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 363, at /www/docs/.../mt/lib/MT/PluginData.pm line 28
Compilation failed in require at /www/docs/.../mt/lib/MT.pm line 220.
Exiting subroutine via next at /www/docs/.../mt/lib/MT.pm line 221.


Anyone else seeing this and/or know how to correct the problem?
photodude
I'm seeing an identical error at a new host. I'd gotten MT up and running great, and moved on to other things. Then they upgraded to Perl 5.8.4, and now I get these errors. My host is looking into it, and dug up this tidbit from somewhere:

"What this means is that if you have data written by Storable 1.x running on perl 5.6.0 or 5.6.1 configured with 64 bit integers on Unix or Linux then by default this Storable will refuse to read it, giving the error Byte order is not compatible. If you have such data then you you should set $Storable::interwork_56_64bit to a true value to make this Storable read and write files with the old header. You should also migrate your data, or any older perl you are communicating with, to this current version of Storable."

What the heck that means, I don't know, other than I'm dead in the water. And this is not with 3.0, it's with 2.6
Shawn Y
Yeh, that's from the Storable.pm man page. But like you, I'm afraid I've not been able to do anything useful with the information. smile.gif
Shawn Y
Thanks to an unnamed benefactor who isn't sure if the new licensing terms would permit him to suggest "hacking" MT, I have an answer to the problem.

In short, edit {MT dir}/lib/MT/PluginData.pm, locating line 9 which reads:

CODE
use Storable qw( freeze thaw );


And add the following after it:

CODE
begin {

$Storable::interwork_56_64bit = 1;

}


This, as may be obvious, kicks in a compatibility mode that will prevent the above-mentioned error from occuring.
jikon
Shawn,

I tried your suggested solution, unfortunately, that didn't work for me.

My host has recently upgraded to Perl 5.8.4 and now none of my plug-ins will work. And it's very frustrating.

I've got the host looking into the matter, but does anyone else have any bright ideas?

jikon
loopit
I'm having this same problem (on MT 2.666). Here's the error I was getting when trying to add a new entry:

CODE
Byte order is not compatible at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 363, at lib/MT/PluginData.pm line 30


Here's the error I get when changing the PluginData.pm as suggested two posts above.

CODE
Can't locate object method "load" via package "MT::PluginData" at plugins/sub_cats.pl line 59.


If anybody has any suggestions as to how to fix this I would appreciate a response.
loopit
Anybody?
loopit
Does anybody know how to fix this? I"m still having this problem.
Peter Smith
It worked for me, but I didn't bother with the begin and the curly braces {}
eekidi
QUOTE (jikon @ Jul 19 2004, 02:38 AM)
Shawn,

I tried your suggested solution, unfortunately, that didn't work for me.

My host has recently upgraded to Perl 5.8.4 and now none of my plug-ins will work. And it's very frustrating.

I've got the host looking into the matter, but does anyone else have any bright ideas?

jikon

Is this case solved ?
reliable web hosting
Movable Type "Byte order is not compatible" error

The error

Byte order is not compatible at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 363, at /home/username/cgi-bin/mt/lib/MT/PluginData.pm line 28

is because Perl 5.8.4 has a default byte order that is different from previous versions.

To resolve this you need to add the following after line 9 in lib/MT/PluginData.pm

begin {
$Storable::interwork_56_64bit = 1;
}
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.