I get an error when running my PHP script ....
Fatal error: Out of memory (allocated 1827405824) (tried to allocate 88800 bytes)
I added this line to my PHP script ..
ini_set("memory_limit","3000M");
This statement really controls the memory usage correctly, but I can't seem to get it above about 1.8 GB. It is as if the upper limit of memory is being limited somewhere else. I also added in php.ini ...
memory_limit = 3000M
Does anyone know if memory is limited elsewhere?
I am running a local server with Xampp. I have Windows 7, 64-bit with 4 GB of RAM. My script uses the PHP GD image library, and I get an error when trying to highlight a link to an image using ImageCreateTrueColor ().
(I know this is a huge amount of memory, but this is just one of the script, and it is much easier to do so).
Thank.
Update ....
@elusive @Orbling
, , , .
<?php
ini_set("memory_limit","4000000000");
echo "ini_get = " . ini_get('memory_limit') . "<br>\n";
echo "memory_get_usage = " . memory_get_usage(true) . "<br>\n";
$bigImageHandle = imagecreatetruecolor(22200, 24800);
?>
...
ini_get = 4000000000
memory_get_usage = 524288
Fatal error: Out of memory (allocated 1843396608) (tried to allocate 88800 bytes) in
E:\User\My_Webs\experiments\houseshunting\temp\osMaps\t1.php on line 5
, imagecreatetruecolor(), , 2.7