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>
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.
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.
sure will, thanks!
Closing