php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10238 erealloc() function error
Submitted: 2001-04-09 02:41 UTC Modified: 2001-10-28 17:18 UTC
From: csjang at mail dot knfc dot co dot kr Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: WINDOWS 98
Private report: No CVE-ID: None
 [2001-04-09 02:41 UTC] csjang at mail dot knfc dot co dot kr
I found tht folloing error during file ( file size ablout 12 MB) uploading :

[Mon Apr 09 15:33:22 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/php/php.exe
[Mon Apr 09 15:33:22 2001] [error] [client 127.0.0.1] FATAL:  erealloc():  Unable to allocate 5876001 bytes

Maybe above error is some PHP memory error. I can't solve
this problem.

PLEASE HELP ME.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-09 04:58 UTC] hholzgra@php.net
current implementation of file uploads
requires the uploaded form data including 
the file data itself to be completly held
in memory for a short while

if your file gets to big it may exhaust 
the available memory on your system

to prevent php from bailing out here you
should set a lower limit for upload_max_filesize 
in PHP init and/or switch to an operating system
with better memory handling capabilities than
the still somehow DOS-based Win95/98 line

PS: moved to change request as there should be
a more clever way to deal with post data than
to stuff it all into main memory ... i think i
remember Rasmus talking about someone working on 
this when we met in Brussels
 [2001-10-28 17:18 UTC] sniper@php.net
This should be fixed in CVS now. You can try the latest 
development build from http://www.php4win.com/ but
make sure it's dated after 27th of October 2001.

Also, there are some minor leaks still in the new code.
If you encounter such leaks, please send the shortest
possible code + html with which you can reproduce the leak
to php-dev@lists.php.net (or me) so we can get rid of these leaks. 

This fix will be in PHP 4.2.0.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC