[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1

2001-02-20 Thread sniper

ID: 8940
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Duplicate
Status: Closed
Bug Type: Unknown/Other Function
Assigned To: 
Comments:



Previous Comments:
---

[2001-02-04 12:41:07] [EMAIL PROTECTED]
I can not reproduce this with latest CVS. 
Please try the latest CVS snapshot from http://snaps.php.net/

--Jani



---

[2001-01-26 16:07:33] [EMAIL PROTECTED]
If you view the uploaded file (using "od" in my case), you'll see that 
the first few bytes of it are:

"Content-Type: image/jpeg" followed by the binary data that makes 
up the JPEG file. Since the uploaded file is exactly the same size as 
the original, I presume that the last few bytes are dropped out.

---

[2001-01-26 12:50:56] [EMAIL PROTECTED]
Further testing reveals that the upload is working properly, but the 
file 'type' variable is not set, and PHP is not treating it as an image 
file. Image processing utilities state that the file is corrupt after 
uploading, even though it remains the exact same size as the 
original. I suspect that PHP is doing something to the file.

---

[2001-01-26 12:01:45] [EMAIL PROTECTED]
Ok, I've done some further testing. With a simple script that does 
nothing except upload the file and move it, it works: the file is 
there. However, the "type" variable has no value! No matter what 
type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value 
is an empty string.

---

[2001-01-26 11:21:21] [EMAIL PROTECTED]
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." .
 "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:///upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.



---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8940&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1

2001-02-19 Thread lyric

ID: 8940
Updated by: lyric
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Duplicate
Old-Bug Type: Filesystem function related
Bug Type: Unknown/Other Function
Assigned To: 
Comments:

Duplicate of http://bugs.php.net/bugs.php?id=9298 which is fixed in CVS.

Previous Comments:
---

[2001-02-04 12:41:07] [EMAIL PROTECTED]
I can not reproduce this with latest CVS. 
Please try the latest CVS snapshot from http://snaps.php.net/

--Jani



---

[2001-01-26 16:07:33] [EMAIL PROTECTED]
If you view the uploaded file (using "od" in my case), you'll see that 
the first few bytes of it are:

"Content-Type: image/jpeg" followed by the binary data that makes 
up the JPEG file. Since the uploaded file is exactly the same size as 
the original, I presume that the last few bytes are dropped out.

---

[2001-01-26 12:50:56] [EMAIL PROTECTED]
Further testing reveals that the upload is working properly, but the 
file 'type' variable is not set, and PHP is not treating it as an image 
file. Image processing utilities state that the file is corrupt after 
uploading, even though it remains the exact same size as the 
original. I suspect that PHP is doing something to the file.

---

[2001-01-26 12:01:45] [EMAIL PROTECTED]
Ok, I've done some further testing. With a simple script that does 
nothing except upload the file and move it, it works: the file is 
there. However, the "type" variable has no value! No matter what 
type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value 
is an empty string.

---

[2001-01-26 11:21:21] [EMAIL PROTECTED]
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." .
 "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:///upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.



---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8940&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1

2001-02-04 Thread sniper

ID: 8940
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Filesystem function related
Assigned To: 
Comments:

I can not reproduce this with latest CVS. 
Please try the latest CVS snapshot from http://snaps.php.net/

--Jani



Previous Comments:
---

[2001-01-26 16:07:33] [EMAIL PROTECTED]
If you view the uploaded file (using "od" in my case), you'll see that 
the first few bytes of it are:

"Content-Type: image/jpeg" followed by the binary data that makes 
up the JPEG file. Since the uploaded file is exactly the same size as 
the original, I presume that the last few bytes are dropped out.

---

[2001-01-26 12:50:56] [EMAIL PROTECTED]
Further testing reveals that the upload is working properly, but the 
file 'type' variable is not set, and PHP is not treating it as an image 
file. Image processing utilities state that the file is corrupt after 
uploading, even though it remains the exact same size as the 
original. I suspect that PHP is doing something to the file.

---

[2001-01-26 12:01:45] [EMAIL PROTECTED]
Ok, I've done some further testing. With a simple script that does 
nothing except upload the file and move it, it works: the file is 
there. However, the "type" variable has no value! No matter what 
type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value 
is an empty string.

---

[2001-01-26 11:21:21] [EMAIL PROTECTED]
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." .
 "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:///upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8940&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1

2001-01-26 Thread glen

ID: 8940
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Description: File uploads stopped withing in 4.0.4pl1

If you view the uploaded file (using "od" in my case), you'll see that 
the first few bytes of it are:

"Content-Type: image/jpeg" followed by the binary data that makes 
up the JPEG file. Since the uploaded file is exactly the same size as 
the original, I presume that the last few bytes are dropped out.

Previous Comments:
---

[2001-01-26 12:50:56] [EMAIL PROTECTED]
Further testing reveals that the upload is working properly, but the 
file 'type' variable is not set, and PHP is not treating it as an image 
file. Image processing utilities state that the file is corrupt after 
uploading, even though it remains the exact same size as the 
original. I suspect that PHP is doing something to the file.

---

[2001-01-26 12:01:45] [EMAIL PROTECTED]
Ok, I've done some further testing. With a simple script that does 
nothing except upload the file and move it, it works: the file is 
there. However, the "type" variable has no value! No matter what 
type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value 
is an empty string.

---

[2001-01-26 11:21:21] [EMAIL PROTECTED]
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." .
 "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:///upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.



---


Full Bug description available at: http://bugs.php.net/?id=8940


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1

2001-01-26 Thread glen

ID: 8940
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Description: File uploads stopped withing in 4.0.4pl1

Further testing reveals that the upload is working properly, but the 
file 'type' variable is not set, and PHP is not treating it as an image 
file. Image processing utilities state that the file is corrupt after 
uploading, even though it remains the exact same size as the 
original. I suspect that PHP is doing something to the file.

Previous Comments:
---

[2001-01-26 12:01:45] [EMAIL PROTECTED]
Ok, I've done some further testing. With a simple script that does 
nothing except upload the file and move it, it works: the file is 
there. However, the "type" variable has no value! No matter what 
type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value 
is an empty string.

---

[2001-01-26 11:21:21] [EMAIL PROTECTED]
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." .
 "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:///upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.



---


Full Bug description available at: http://bugs.php.net/?id=8940


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1

2001-01-26 Thread glen

ID: 8940
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Description: File uploads stopped withing in 4.0.4pl1

Ok, I've done some further testing. With a simple script that does 
nothing except upload the file and move it, it works: the file is 
there. However, the "type" variable has no value! No matter what 
type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value 
is an empty string.

Previous Comments:
---

[2001-01-26 11:21:21] [EMAIL PROTECTED]
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." .
 "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:///upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; 
Mac_PowerPC)
"

No errors are reported any where.



---


Full Bug description available at: http://bugs.php.net/?id=8940


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]