From: Ashley Sheridan on 13 Jul 2010 16:26 On Tue, 2010-07-13 at 14:22 -0600, Larry Martell wrote: > On Tue, Jul 13, 2010 at 11:11 AM, Ashley Sheridan > <ash(a)ashleysheridan.co.uk> wrote: > > > > On Tue, 2010-07-13 at 11:06 -0600, Larry Martell wrote: > > > > I have an app that runs just fine on an older Solaris apache server > > (Apache/2.0.53 PHP/5.0.4), but when I run the same app on a newer > > Linux server (Apache/2.2.3-11 PHP/5.2.8) against the same database on > > the same mysql server, it fails with "Allowed memory size exhausted". > > This occurs on a: > > > > $result = mysql_query($query, $db) > > > > statement. Both servers are running the identical query, which returns > > a result set under 0.5M. The Solaris server is configured with > > memory_limit = 8M in php.ini, and the Linux one with 32M, so clearly > > something other then what I'm seeing is going on. Anyone know what > > could be causing this? Any php or apache build or config options that > > I could look at? > > > > TIA! > > > > > > Is there any other place which your code is changing the memory_limit parameter? I would assume this is unlikely, but sometimes even the unlikely happens more than than it should! > > The error message actually says "Allowed memory size of 3355432 bytes > exhausted" so I know it's using the 32M that it's set to php.ini. But > as I wrote above, on the Solaris server where it works, the > memory_limit is set to 8M. > > > Can you maybe strip the code down to a test case which causes the error? > > I've already done that - all it does it run a query and display the results. > > > Lastly, I do notice that you've got two different versions of PHP & Apache installed on each OS, which could be the reason for the failure. > > Well, yes, that's what I said. And they may been built with different > config options. But what options could cause a difference like this? > > > Maybe set up a VM or two to test things out. Have one VM with Solaris and Apache/2.2.3-11 & PHP/5.2.8, and another VM with Apache/2.0.53 & PHP/5.0.4 and see what happens. It could be that it's either Apache or PHP or both > > causing the problems on your Linux system. > > I don't have control of that. This is at a client site - they want to > get rid of their existing older Solaris apache server and move to a > newer Linux one. The servers are already set up they way they are. I > asked the admis for info on the build - they have it for the newer > Linux one, but not for the older Solaris one. They did give me another > machine to test on - that one is Linux, Apache 2.2.3, PHP 5.2.6 - that > also gets the out of memory error. > That's why I suggested a VM, as you can have as many of these set up as you need on your own computer to test things. Thanks, Ash http://www.ashleysheridan.co.uk
|
Pages: 1 Prev: calendar libs Next: Posting values of dynamically generated text fields at a time |