From:             [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:      4.1.2
PHP Bug Type:     Scripting Engine problem
Bug description:  Large upload produce "Unable to allocate xxx bytes" error in Apache

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
-- 
Edit bug report at http://bugs.php.net/?id=16713&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16713&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16713&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16713&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16713&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16713&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16713&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16713&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16713&r=submittedtwice

Reply via email to