Error when import Excel file using Excel Reader class
Got such error:
Wed Feb 17 15:41:07 2010] [error] [client 178.92.0.85] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in /var/www/vhosts/hostname/httpdocs/modules/cckimport/Excel/oleread.inc on line 27, referer: http://hostname/ru/create_price_list
Probably one server has a 64 bit processor. The GetInt4d bit shift doesn't work with 64 bit processors.
Andreas Rehm hacked it to ensure correct result of the <<24 block on 32 and 64bit systems, just replace the code of the GetInt4d function with the following:
$_or_24 = ord($data[$pos+3]);
if ($_or_24>=128)
$_ord_24 = -abs((256-$_or_24) << 24);
else
$_ord_24 = ($_or_24&127) << 24;
return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | $_ord_24;