PHP CLI running out of memory -


i'm trying reserialize 1gb sql dump using fix-serialization.php file https://github.com/blogestudio/fix-serialization/blob/master/fix-serialization.php

with command:

php -d memory_limit=-1 fix-serialization.php dump.sql  

but following error

php fatal error:  out of memory (allocated 2328100864) (tried allocate 18446744071742389167 bytes)  

i same error when try:

php -d memory_limit=2000m fix-serialization.php dump.sql  

obviously computer not have 18446744071 gb of ram. i'm getting error on both mbp , ubuntu machine , i've tried running script on php5.6 , 7

looks shoud make own solution. script won't fit since reads whole file @ once , passes whole file preg_replace. regex quite complex, needs lot of memory processing such big strings. should read 1 data line, proccess line , write output file. open input file reading, , output file writing, data won't corrupted.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -