php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16713 Large upload produce "Unable to allocate xxx bytes" error in Apache
Submitted: 2002-04-20 11:33 UTC Modified: 2002-04-20 11:41 UTC
From: zebz at hotmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.1.2 OS: Windows 98
Private report: No CVE-ID: None
 [2002-04-20 11:33 UTC] zebz at hotmail dot com
I use the default installation of PHPTriad (PHP 4.1.2 run as a CGI module on Apache 1.3.X). I increased the following variables on php.ini in an attempt to make large uploads work:

 upload_max_filesize: 32M
 post_max_size: 32M 
 memory_limit: 64M
 max_execution_time: 3000
 
I use a standard upload form (with MAX_FILE_SIZE correctly set) and the .php file where the data are posted is a simple "print_r($_FILES)" to test if it works.

However, everytime I upload a file over 5Mb, I get a "500 internal server error" after a relatively short time. The larger the file is, the longer it takes for the error to appear so I assume the problems occurs once PHP is called. Looking at the Apache log, I see the following:

Premature end of script headers: c:/apache/php/php.exe
FATAL:  erealloc():  Unable to allocate 5872001 bytes

So it means the large file makes the Apache session crash. I've been trying to make this work for over two weeks but files over 5Mb never work.

Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-20 11:41 UTC] sniper@php.net
This is fixed in PHP 4.2.0. (release is on Monday, 22th April). You can try the release candidate from here:

http://www.php.net/~derick/


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 20:01:29 2024 UTC