ID: 47908 Updated by: s...@php.net Reported By: kiet dot tran at enscm dot fr -Status: Open +Status: Bogus Bug Type: OCI8 related Operating System: linux Redhat ES 4.7 PHP Version: 5.2.9 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ---------------- Your observation is likely due to PHP 5 tracking memory better. The migration doc http://www.php.net/manual/cs/migration52.other.php says 'Thanks to this new-found accuracy memory usage may appear to have increased, although actually it has not.' Or perhaps the new memory manager chunking and other changes to OCI8 plays a role. Calculate how much data you need to hold after fetching to see what expectation you should have. With large data sizes, fetching LOBs as locators (i.e. remove OCI_RETURN_LOBS) and operating on them one by one might reduce peak memory, depending on your output requirements. Previous Comments: ------------------------------------------------------------------------ [2009-04-06 13:23:27] kiet dot tran at enscm dot fr Description: ------------ I have this function which runs well on Php 4.9 : function lire_structure($inlist_stru,$link) { if ($inlist_stru=='') return ''; $stmt = OCIParse($link,"select STRU_ID,STRU_MOLFILE from sub_structure_view where stru_id in(".$inlist_stru.")"); OCIExecute($stmt); while (OCIFetchInto ($stmt, $row, OCI_RETURN_LOBS)) { $i++; $tabstru[$row[0]]=$row[1]; //echo "$i<br>"; } return $tabstru; } But when I used it on php 5.2.9 : I have this following error : Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 524288 bytes) So I change the memory limit of php.ini from 128 M to 512 (256 m is not enough) and the function works well. But I'm asking why with php 4.9 where the memory limit of php.ini is only at 8 M, the function works well? I see in internet forum that php 5 releases memory no correctly. Could you help me? Actual result: -------------- I have this following error : Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 524288 bytes) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47908&edit=1