Bug 58473

Summary: php upload broken
Product: [Retired] Red Hat Linux Reporter: Fabrice <k141>
Component: phpAssignee: Phil Copeland <copeland>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: k141
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-27 14:49:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:
Always

Steps to Reproduce:
1.Try the following script
2.
3.
	

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 
apache.

#!/usr/local/bin/php
<HTLM><BODY>
<FORM ENCTYPE="multipart/form-data" ACTION="upload.php"
METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE"
value="100000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
<?
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");
?>
</BODY></HTML>

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
Closing