Bug 58473 - php upload broken
Summary: php upload broken
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php
Version: 7.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-01-17 18:43 UTC by Fabrice
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2002-02-27 14:49:04 UTC

Attachments (Terms of Use)

Description Fabrice 2002-01-17 18:43:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)

Description of problem:
Internal server error 500 returned after file is uploaded.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Try the following script

Actual Results:  Internal server error 500

Expected Results:  The script should print the file name.

Additional info:

php is run as CGI. php script secured 755.
php version 4.0.6

Problem occured after ISP upgraded to redhat 7.2 and php4.0.6, apache 1.3.20. 
Previous version was working and was 6.1 php 4.0.2 and I don't know about 

<FORM ENCTYPE="multipart/form-data" ACTION="upload.php"
<INPUT TYPE="hidden" name="MAX_FILE_SIZE"
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
echo "\$userfile=".$userfile."<br>";
echo "\$userfile_name=".$userfile_name."<br>";
echo "\$userfile_size=".$userfile_size."<br>";
echo "\$userfile_type=".$userfile_type."<br>";
echo "is_uploaded_file=".is_uploaded_file($userfile)."<br>";
copy($userfile, "testfile");

Comment 1 Fabrice 2002-01-20 01:28:15 UTC
I have installed 4.0.4pl1 on the same system (just compiling with --with-mysql -
-with-apache --host i386-redhat-linux) and that worked. Unfortunately I can't 
install RPMS so I had to go with the simple compile.

I've opened a bug report with php #15102.

Comment 2 Peter Bowen 2002-02-27 14:21:55 UTC
According to your bugs.php.net bug report, http://bugs.php.net/bug.php?id=15102,
suggests that it is probably fixed in 4.1.*, as 4.0.6 had some file upload bugs.
  Additionally 4.1.2 has a buffer overrun fixed in the file upload code.  Once
4.1.2 is released as an errata, please test to see if this is fixed.

Comment 3 Fabrice 2002-02-27 14:49:00 UTC
sure will, thanks!

Comment 4 Phil Copeland 2002-08-12 18:54:42 UTC

Note You need to log in before you can comment on or make changes to this bug.