php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15102 Upload fails (internal error 500)
Submitted: 2002-01-18 11:08 UTC Modified: 2002-03-19 00:00 UTC
Votes:7
Avg. Score:3.4 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: k141 at hotmail dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.0.6 OS: Red Hat 7.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-01-18 11:08 UTC] k141 at hotmail dot com
A simple standard form is used to upload a file

<form action="upload.php" enctype="multipart/form-data" method="post">
File: <input type="file" MAX_FILE_SIZE="10000" name="userfile">
<input type="submit" value="send">
</form>

The php script says:

#!/usr/local/bin/php
<?php
echo $userfile;
?>

My ISP upgraded from PHP 4.0.2 to 4.0.6 and at the same time from Redhat 6.1 to 7.2. Apache is 1.3.20.

I've been battling with my ISP (Interland) who says that since i'm not doing anything with the file, this can't work. I gave up trying to teach them PHP after the "senior PHP support specialist" told me that can't work (I wonder why it did before, then).

What happens is the file gets uploaded (takes time to upload, so it is definitely transfering it), then I get the Internal Server Error 500. I don't see the file on /tmp.

There is no php.ini anywhere on the server, so I guess the default values are taken. The phpinfo() looks fine to me.

This worked fine on 4.0.2 and 3.0.9. I tried uploading a file using perl and that works, but i want to use php.

Help!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-18 14:15 UTC] sander@php.net
It should work. It's probably a configuration problem (echo'ing $userfile should print out the temporary filename of the uploaded file).
Can you provide some more information, like what's in the error log?
 [2002-01-18 14:27 UTC] k141 at hotmail dot com
The only log I know about is error_log on /usr/local/apache/log is there anything else I should look at?

[Fri Jan 18 14:22:53 2002] [error] [client 151.200.238.39] Premature end of script headers: /home/usr235/html/upload.php

phpinfo says: 

 './configure' '--with-mysql=/usr/local/mysql' '--prefix=/usr/local/php' '--with-mck=/usr/local/mck-3.2.0.3-linux' '--with-dbase' '--with-pfpro=/usr/local/pfpro' '--enable-discard-path' '--prefix=/usr/local' '--with-gd' '--enable-gdbm' '--enable-bcmath' '--with-config-file-path=/usr/local/apache' '--enable-magic-quotes' '--enable-ftp'

Server API CGI 
Virtual Directory Support disabled 
Configuration File (php.ini) Path /usr/local/apache 

Note that there is no php.ini in this path, or anywhere on the server.

Finally someone that agrees with me that this should work!!! 
 [2002-01-19 20:26 UTC] k141 at hotmail dot com
Hi,

I have compiled 4.0.4pl1 on the system (simple static install, --with-mysql --with-apache, --host i386-redhat-linux, everything else defaulted, and the script works fine, so there is a problem with 4.0.6. I can't install RPMS as I don't have rpm access. I opened a ticket with the ISP for them to check the configuration, but I don't understand why PHP barfs. I will try with 4.0.5 tomorrow.

Fabrice.
 [2002-01-20 17:49 UTC] k141 at hotmail dot com
So my ISP changed to Apache 3.1.19, still running redhat 7.2 and php 4.0.6. Problem still exists.

I have compiled and installed 4.0.5 in my directory and script is running fine.

Fabrice.
 [2002-02-04 02:26 UTC] yohgaki@php.net
Could you check if this problem is in 4.1.1?
 [2002-02-18 09:46 UTC] k141 at hotmail dot com
I'm unable to install 4.1.1 for now, can't test.
 [2002-02-18 10:18 UTC] sesser@php.net
Fileupload in 4.0.6 was kinda broken. I am very sure that
4.1.0 and 4.1.1 fix that issue.

Otherwise tell us what browser you are using.


 [2002-03-19 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, 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: Wed Apr 24 20:01:32 2024 UTC