Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integer overflow in memory_limit check detected -- Cannot set memory limit past 2gb?

Tags:

php

I'm running PHP 5.1.6 with a 64-bit platform, 7.5 GB memory. I have the memory_limit set to 4 gigs.

I'm zipped a large amount of files (output size ~= 2gb), so I need this memory available.

When zipping the largest of my files, those that approach the 2gb limit I've imposed, the script fails with:

Integer overflow in memory_limit check detected

I am assuming this has to do with the integer that is holding the memory_limit and it must be 32-bit. Is there a way to work around this or can I only set my memory limit to 2048M?

like image 840
DDPnks Avatar asked May 03 '10 18:05

DDPnks


1 Answers

This is a known bug - please upgrade to the latest version of PHP :)

p.s. there is an addendum here which suggests that if the problem persists, use 4000000000 instead of 4GB in the memory_limit directive

like image 62
Andy Avatar answered Sep 26 '22 05:09

Andy