0

I can't seem to run php on a simple script which processes a 400MB file with a bunch of regular expressions. It probably requires over 2GB of memory but only seems to go up to 1GB even though it should be unlimited memory

The script i used was this one: https://github.com/v0s/plus22

C:\Tools\plus22>php -d memory_limit=-1 plus22.php C:\reversing+22\reversing.exe.asm

script also contains inside it

ini_set("memory_limit", -1);

Error happens like this

[.] QWord -> DWord

Fatal error: Out of memory (allocated 992215040) (tried to allocate 491897887 by
tes) in C:\Tools\plus22\plus22.php on line 224


C:\Tools\plus22>php -v
PHP 5.4.34 (cli) (built: Oct 15 2014 21:58:00)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
SSpoke
  • 5,656
  • 10
  • 72
  • 124
  • 5
    Where are you hosting this? I would also like a server with unlimited memory. – Sam Dufel Dec 17 '14 at 23:07
  • 2
    Are you running this on 32 bit windows? – OIS Dec 17 '14 at 23:10
  • Yes i'm running the php.exe from my windows xp 32bit machine. I should be able to get atleast 2GB or memory, shouldn't it start using virtual memory (harddrive?) if I run out of memory, although I have over 2GB. – SSpoke Dec 17 '14 at 23:10
  • Well, 32b windows with 4GB reserves 2 GB and all other programs shares what is left. What PHP version? – OIS Dec 17 '14 at 23:12
  • 1
    There’s no such thing as “unlimited memory”. – Martin Bean Dec 17 '14 at 23:12
  • PHP 5.4.34 (cli) (built: Oct 15 2014 21:58:00) Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies. – SSpoke Dec 17 '14 at 23:13
  • If you got 4GB RAM you can try running it in linux (download a live DVD - not Virtual Machine). – OIS Dec 17 '14 at 23:15
  • Anyone know of a PHP.exe which is patched to run indefinitely or until the script is finished? @OIS: i'll try linux. – SSpoke Dec 17 '14 at 23:17

0 Answers0