php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34173 FATAL: emalloc(): Unable to allocate xxxxxxxx bytes.
Submitted: 2005-08-17 17:53 UTC Modified: 2005-08-19 14:13 UTC
From: benoit at bh-services dot net Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.3.11 OS: WIN XP SP2
Private report: No CVE-ID: None
 [2005-08-17 17:53 UTC] benoit at bh-services dot net
Description:
------------
Hi, 

I've exactly the same error:
   FATAL: emalloc(): Unable to allocate 1667330172 bytes.

I use PHP 4.3.8 on a WinXP SP2 server with 1 Gig of memory.
I also tried with PHP 4.3.11 and this is the same problem.
Apache version is Apache/2.0.46 (Win32).

This is a development server and I'm the only one user to use it.


This happens when I use references on objects.
I guess this is because sometimes the objects are passed by references and sometimes by copy.

I've a framework to manage a very complex application, and I need to always have the real object and not a copy of this one.  I can't use PHP 5 because this is on a production server used by different applications and this is not possible to migrate it.

I really don't know how my PHP script needs about 1 Gig of memory.

Also I've no way to give you more information to fix it.

Thanks,
Benoit Heinrich.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-17 18:10 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
 [2005-08-19 14:13 UTC] benoit at bh-services dot net
Ok, this bug is now fixed with the PHP 4.4.0 version.

It was due to the memory leak bug when using object and references on themselves.

So now there is a weird thing because I have strange messages on some functions which is "Only variable references should be returned by reference".

But this one will be discussed in an other bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC