Results from ini_get with safe_mode=On [memory_limit] => Array ( [global_value] => 8M [local_value] => 8M [access] => 7 )
And the manual says: PHP_INI_ALL - 7 - Entry can be set anywhere
So I figure I have access to change memory_limit?
But when I do that with ini_set("memory_limit", "32M") the memory change is ignored. I still have just 8M to play with. If i turn of safe mode, I am able to change the memory limit. Please tell me if this is correct behaviour or not.
My problem is that i uploaded an image, and when I try imagecreatefromjpeg, php dies with a warning about runing out of memory. I then turn off safe mode, restart apache which takes very long time, hit imagecreatefromjpg; and it then works. But not with 8M in safe_mode.
Is there any method in Linux to monitor the resource usage of php+apache. Yes, I have checked with top, ps, procmeter3 and free, but all seems fine and dandy. Absolutely normal. So is there some kind of 'php internal memory usage' measure i can do?
I would like to be able to resize big images without any hangs in php after call to imagecreatefromjpeg(...). Is functions in php supposed to 'stop and hang' the parsing of php-files until apache is restarted when they exceed their memory boundaries. I don't think so. Looks to me like gd have to do some asertions or something.
So I took some time and make all function calls call-by-reference and removed all stupid stuff like $image = adslashes($source_image); that allocated new variables (yes, i still call addslashes...) to lower the memory usage. Maybe it did, but I still am unable to resize images bigger than 200 kb.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php