offensive-security / masscan-web-ui

MASSCAN Web UI
482 stars 187 forks source link

PHP Fatal error: #17

Closed SaiGonSeamus closed 7 years ago

SaiGonSeamus commented 7 years ago

Hi, I'm importing a 2.5GB xml file and getting this error.

PHP Fatal error:  String allocation overflow, max size is 2147483647 in /var/www/html/import.php on line 79

Fatal error: String allocation overflow, max size is 2147483647 in /var/www/html/import.php on line 79

Any ideas?

Server has plenty of memory 12GB and I have added

ini_set("memory_limit", -1);

But get the same error.

pawco commented 7 years ago

Which PHP version you are using? Check this link.

SaiGonSeamus commented 7 years ago

I'm using 5.5

I was following the old instructions from the site not github.

pawco commented 7 years ago

If you want to process files bigger than 2GB you must use PHP >=7 (64-bit build).

As of PHP 7.0.0, there are no particular restrictions regarding the length of a string on 64-bit builds. On 32-bit builds and in earlier versions, a string can be as large as up to 2GB (2147483647 bytes maximum)