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!

Can you maybe strip the code down to a test case which causes the error?

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.
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.

Thanks,
Ash
http://www.ashleysheridan.co.uk


Reply via email to