From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.4pl1
PHP Bug Type:     Filesystem function related
Bug description:  File uploads stopped withing in 4.0.4pl1

I've been using 4.0.3 for a couple of weeks now. Last night I ran the 
Redhat Update agent and installed 4.0.4pl1. Everything works fine 
except for file uploads. The upload is recorded as successful, 
everything SEEMS to work fine, but there is no file in /tmp, and the 
variable $HTTP_POST_FILES['userfile']['type'] is undefined. Apache 
1.3.14 reports no problems, and returns a 200 return code. I've 
tried working with php.ini; I can turn file uploads off, and that 
works, then when I turn it back on again, it has the same problem. 
I'm pretty sure it's something in 4.0.4pl1 because nothing else on 
my system has changed since the upgrade last night. Here's some of 
my code:

                        $file_type = $HTTP_POST_FILES['userfile']['type'];
                        if (substr($file_type,-4,4) != 'jpeg') {
                                die( "Files of type '" . $file_type .
                                     "' are not recognized.<br>" .
                                         "Only JPEG images are currently supported." );
                        }
                        
                        $path_for_file = 'gallery/' . $user_id . '/' . $photo_id . 
'.jpg';
                        if 
(!is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name']))
                                die( "File is not uploaded." ); 
                        move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], 
$path_for_file);

...but I really don't think the problem is in the code. Here's some 
output from my Apache log file:

192.168.1.2 - - [26/Jan/2001:08:13:04 -0800] "POST /upload.php 
HTTP/1.1" 200 51
"http://<mysite>/upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.




-- 
Edit Bug report at: http://bugs.php.net/?id=8940&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to