#33774 [NEW]: Recieving "FATAL: emalloc()" error
| From: | brandonnimon at comcast dot net | Date: | Tue, 19 Jul 2005 17:02:08 +0000 |
| Subject: | #33774 [NEW]: Recieving "FATAL: emalloc()" error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-82155@lists.php.net to get a copy of this message | ||
From: brandonnimon at comcast dot net
Operating system: Windows XP SP2
PHP version: 4.4.0
PHP Bug Type: Reproducible crash
Bug description: Recieving "FATAL: emalloc()" error
Description:
------------
I am programming a PHP program and have recently upgraded to PHP 4.4.0
(from 4.3.11). The current program I had did not have any issues. But I
wrote more of the program and ran into a "FATAL: emalloc() [could not
allocate 25948985 bytes]". I don't have the exact error, since my error
log got wiped.
I reverted back to 4.3.11 to see if it would give me any real errors
(since I knew there were some core updates in 4.4.0). It gave me 1.8GB of
real errors and corrupted my error log. I ran the test again on a fresh
error log, stopped it sooner (less than a second) which gave me 660000
lines of errors. There are some problems with my program (and they
happened to be in/cause and infinite loop:
[Tue Jul 19 09:10:21 2005] [error] PHP Warning: array_shift(): The
argument should be an array in c:\\program files\\apache
group\\apache\\htdocs\\guestbookadmin\\commoncode.php on line 170
[Tue Jul 19 09:10:21 2005] [error] PHP Notice: Undefined variable:
active_entries in c:\\program files\\apache
group\\apache\\htdocs\\guestbookadmin\\commoncode.php on line 169
But it seems that 4.3.11 should limit the number of errors logged, and
4.4.0 should display more than an emalloc() error.
The only change I've made to my PHP file, other than upload settings, is
the max script time is set to 24 hours and max memory alotment is 250MB
(plenty of memory to go around).
Reproduce code:
---------------
http://67.181.154.141:81/guestbookadminsource/
there should be a list of
the page's .source files. This site is only up while I am awake (7:30am -
11:00pm PST -weekdays; 10:00am - 12:00am PST -weekends). You can either
click on each file to show highlighted source, or click the "edit" link on
the right to get the source.
The files you need (I think -- worst comes to worst, copy all the files as
PHP files and run the program, it will self-install) to reproduce the
errors are commoncode.php, logintest.php, settings.php, manage.php,
hycodeii.php, inout.php.
To reproduce:
-open inout.php and add a few posts (enter the info at the top).
-login to guestbook admin by opening manage.php and type "admin",
password: "password".
-You should see a list of the entries you just put in. Hit "accept" on any
of them.
-The system will seem to lockup. Hit "stop" and check your error log.
Expected result:
----------------
If you are running my program, it should say "entry #.. has been accepted"
and move that entry to the active entry list.
As for PHP, it shouldn't just say "FATAL: emalloc()..." it should have
what actually happend (like with 4.3.11, but shorter).
Actual result:
--------------
I think you've gotten the drift of what actually happens. To recap:
4.4.0 stops the browser, and posts "FATAL: emalloc()..." to the error
log.
4.3.11 posts an infinite amout of errors to the error log.
--
Edit bug report at http://bugs.php.net/?id=33774&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33774&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33774&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33774&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33774&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33774&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33774&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33774&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33774&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33774&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33774&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33774&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33774&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33774&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33774&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33774&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33774&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33774&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33774&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33774&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33774&r=mysqlcfg