|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9223 recode_string leaks memory
Submitted: 2001-02-12 05:33 UTC Modified: 2001-10-25 04:41 UTC
From: rr at nci dot ch Assigned:
Status: Closed Package: Recode related
PHP Version: 4.0.4pl1 OS: SuSE-Linux 7.0
Private report: No CVE-ID: None
 [2001-02-12 05:33 UTC] rr at nci dot ch
I use the following procedure to recode records that are read in from a dbase file. If I run this script for all the 3500 records in the dbase file the apache server process uses 150MB of memory.

function recodeDBF($dbfin) {


while( list($key, $inval) = each($dbfin) ) {
    $dbfout[$key]=recode_string("pc..l1",trim($inval)); // A LOT OF MEMORY
    // $dbfout[$key]=trim($inval); // NORMAL MEMORY USAGE
    return $dbfout;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-08 11:46 UTC]
Seems that this is a recode memory leak, not PHP's. At least
Insure says that recode library is leaking memory all over
the place. You may want to contact recode developers. 
 [2001-03-08 12:12 UTC]
Better be in 'Analyzed', to know the problem still exists.
 [2001-04-28 23:30 UTC]
Suspended is better..

 [2001-10-25 04:41 UTC]
Fixed with GNU recode 3.6.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 08:03:38 2023 UTC