|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28362 Receiving 500 error when uploading file.
Submitted: 2004-05-11 20:21 UTC Modified: 2004-06-17 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: chris at komodohost dot com Assigned:
Status: No Feedback Package: Apache related
PHP Version: 4.3.6 OS: RedHat Enterprise Linux 3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-05-11 20:21 UTC] chris at komodohost dot com
Receiving Internal Server Error on any form posted which contains an uploaded file. We are running PHP with PHPSuExec. File has correct ownership and permissions. PHP was configured with:

'./configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' 

Reproduce code:

// Sample available at: 

if ($_POST[file1]) {
  echo "Success!";

<form enctype="multipart/form-data" method="POST">
  <input type="file" name="file1" size="48">
  <input type="submit" value="Continue">

Expected result:
Upon posting form, "Success!" should be displayed.

Actual result:
500 Internal Server Error


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-11 21:00 UTC] chris at komodohost dot com
Still getting the same error after upgrading.
 [2004-05-11 23:12 UTC]
What shows in your Apache error log?
(Also, drop the --enable-versioning option to ./configure).
 [2004-05-11 23:51 UTC] chris at komodohost dot com
Ok, dropped the --enable-versioning option. The Apache log shows the dreaded "Premature end of script headers" error.
 [2004-05-12 15:30 UTC]
Does the error occur if you compile PHP without 
 [2004-05-12 17:13 UTC] chris at komodohost dot com
I've tried recompiling without --enable-discard-path, however it still receives the error. The current configure line is:

./configure --prefix=/usr --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-mcrypt --with-mhash --enable-magic-quotes --with-mysql --with-pear --enable-sockets --enable-track-vars --with-zlib
 [2004-06-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 11:01:30 2024 UTC