From:             noma4i at gmail dot com
Operating system: WIN
PHP version:      5.2.6
PHP Bug Type:     Scripting Engine problem
Bug description:  file - exhaust memory

Description:
------------
For my purpose I'am parsing into array of strings, 5mb file with near
30000 lines. 

file — Reads entire file into an array

It exhaust memory while doing. Code like:

file("here_goes_5mb_30k_lines_file.cvs");

with 8mb opened for executing will produce:
Fatal error: Allowed memory size of 8388608 bytes exhausted

Reproduce code:
---------------
file("here_goes_5mb_30k_lines_file.cvs");

Actual result:
--------------
Fatal error: Allowed memory size of 8388608 bytes exhausted

-- 
Edit bug report at http://bugs.php.net/?id=46583&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46583&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46583&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46583&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46583&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46583&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46583&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46583&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46583&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46583&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46583&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46583&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46583&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46583&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46583&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46583&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46583&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46583&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46583&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46583&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46583&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46583&r=mysqlcfg

Reply via email to