|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-06-13 00:34 UTC] wiggum24 at gmail dot com
Description: ------------ Since upgrading from 5.1.? to 5.2.3, we're having problems with memory limits being exhausted, we never encountered this problem previously. Our memory_limit on all production servers was set to 8 meg and we never had a problem, after this upgrade I've knocked it up to 64 meg and we're still having problems with some scripts. Some instances give "memory limit exhausted", the scripts just stops without generating an error in other instances. Error is reproducable, the same scripts stop consistently. Pulling a large recordset out of a database is usually the culprit, but it happens with both MS SQL server and Postgres. I've done a bit of googling, other people are experiencing this inflated memory requirement problem. Reproduce code: --------------- $sql="SELECT * FROM blah WHERE foo=1"; $rs=$db->query($sql); Expected result: ---------------- For it to return my recordset :) Actual result: -------------- Either: - script stops mid execution without error - generates "memory limit exhausted" error PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 16:00:01 2025 UTC |
I have the same issue since version 5.2.1, 5.2.0 works fine with memory limit 8M. Here is a script that needs a photo named temp.jpg (min size 2272x1704pixels): <?php function foto() { $f = ImageCreateFromJpeg("temp.jpg"); list($A,$L) = GetImageSize("temp.jpg"); $i = ImageCreateTrueColor(800,600); ImageCopyResized($i,$f,0,0,0,0,800,600,$A,$L); ImageInterlace($i,1); ImageJpeg($i,"foto.jpg",85); ImageDestroy($i); ImageDestroy($f); } foto(); echo "<img src='temp.jpg' width=400px> <hr> <img src='foto.jpg' width=400px>"; ?>