Menu

#7 SOLVED: PHP5 and fatal error: Allowed memory size...

open
nobody
None
5
2008-01-22
2008-01-22
Anonymous
No

the database was tested in php5 and with minor changes it was suitable for php5, and additionally the solution for the fatal error was found:

// file ffdb.inc.php

// modified function line 2812
function read_str($fp)

{

$strlen = $this->bin2dec(fread($fp, 4), 4);

return ($strlen > 0) ? fread($fp, $strlen) : "";

}

// modified function line 2896
function bin2dec(&$str, $len)

{

$shift = 0;

$result = 0;

if (strlen($str) > 0)

{

for($i=0; $i<$len; ++$i)

{

$result |= (ord(substr($str, $i, 1)) << $shift);

$shift += 8;

}

}

return $result;

}

// indexing in strings $str[$i] deprecated in php5!

the database is now in production without errors!

have fun...

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.