|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-30 18:06 UTC] jay@php.net
[2003-10-30 23:33 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ When I use the functions for encrypt some data, the memory that PHP uses, doesn't get free. It gets more and more memory. Reproduce code: --------------- <?php $key = '123456789012345678901234567890'; $iv = '12345678'; $nVeces = 100000; $n = 0; $td = mcrypt_module_open( MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '' ); while( $n < $nVeces ) { $fichero = file_get_contents( "/tmp/hola" ); mcrypt_generic_init( $td, $key, $iv ); $fichero_enc = addslashes( mcrypt_generic($td, $textoPlano) ); unset( $fichero_enc ); if( isset($fichero_enc) ) echo "<b><h1>No pudimos destruir la variable</h1></b><br />"; $n = $n + 1; } mcrypt_module_close( $td ); ?> Expected result: ---------------- A script that execute with a consume of less than 1MB of memory (with a file '/tmp/hola' of 1kB). Actual result: -------------- An script that consumes more than 100MB, or more. A similar script with other data, have been consumed more than 2000MB.