I've an import-from-stand out script included in a Content management systems that formerly went without problem.

My shared-host company has lately upgraded their infrastructure, including PHP from 5.1 to five.2.6, and also the script now returns "Uninitialized string offset: -XXX in /path/scriptname.php online 27" (XXX as being a lowering number from 512 and /path/scriptname.php obviously being the entire road to script under consideration).

It returns this error for each type of the stand out file. Line 27 is simply a return from inside a function that's the very first time the imported information is being processed:

function GetInt4d($data, $pos)  (ord($data[$pos+1]) << 8) 

It finally implodes having a "Fatal error: Permitted memory size 47185920 bytes exhausted (attempted to allocate 71 bytes) in /path/scriptname.php online 133".

There is nothing helpful in Apache error logs. I'm stumped. Anybody have ideas with a minimum of where you can look? Even knowing whether it's apt to be something inside my script or something like that related to upgrade could be helpful. I'd another problem having a different site on same provider that (after upgrade) could not write periods to tmp directory (since resolved), but think it isn't that (?).

EDIT: Because it switched out the answer was related to the version from the parser being incompatible in some manner with PHP 5.2.6, I figured it may be useful to someone who the parser under consideration is Spreadsheet Stand out Readers .

Uninitialized string offset:

... implies that $data isn't an assortment.

Just input, the problem has 'resolved itself' via me getting a newer version from the parsing library I had been using. My prediction may be the problem was something related to the main difference between php versions, though I am unsure precisely what. Fixed but frustrating.

EDIT: I am likely to accept Till's answer purely within the interests of closing the question. Thx again for input.