#34822 [Fbk->Bgs]: PHP writing empty files

2005-10-13 Thread jshay at dakotacom dot net
 ID:   34822
 User updated by:  jshay at dakotacom dot net
 Reported By:  jshay at dakotacom dot net
-Status:   Feedback
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: RedHat Enterprise 3.0
 PHP Version:  4.4.0
 New Comment:

You may close this ticket out. After reviewing this I discovered that
the user that Apache runs, nobody, was over quota. I initially only
looked at the user of the vhost that was having the problem.

I do apologize for wasting your time.


Previous Comments:


[2005-10-12 09:55:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Works just fine here.



[2005-10-12 05:41:06] jshay at dakotacom dot net

link to plain text form:
http://www.tucson-wireless.com/form.php.txt

link to plain text form handler:
http://www.tucson-wireless.com/formhandler.php.txt

link to working form:
http://www.tucsom-wireless.com/admin_files.php

link to "working" form handler:
http://www.tucson-wireless.com/admin_files_formhandler.php

Thanks for your help on this.



[2005-10-11 04:14:13] [EMAIL PROTECTED]

Can you please provide us with a *short* script that consistently
reproduces this bug and that we can run? As it is now, you've only
provided us with what looks like an excerpt of the script, and if we
can't reproduce the issue, we can't tell you if it is a bug or not.
Limiting the code to an accurate representation of the problem will
help you troubleshoot anything that might be wrong with your code and,
if there's something broken with PHP, it will help us isolate it so
that we can fix it efficiently.

Thanks!

----

[2005-10-11 03:08:44] jshay at dakotacom dot net

Description:

A simple upload script uploads the file, fully intact, but then a few
seconds later zero's out the file making a zero byte length file.

Reproduce code:
---
uploading to section = $section\n");
print("file name = $upload_item_name\n");
print("file size = $upload_item_size bytes\n");
print("file in tmp = $size\n");
if (copy ($upload_item, "./$upload_item_name")) {
print("\n");
print("your file was successfully
uploaded!\n");
print("\n");
print("please note your file name -
$upload_item_name\n");
print("you will need to enter it in the
appropriate form.\n");
print("\n");
print("");
} else {
print("can't be copied - there may be another
file with this name\n");
}
}
?>

Expected result:

The file should get written to the directory specified from the form
and named the same name as the uploaded file.

Actual result:
--
Appropriate directories are writable by the apache user/group. Not a
quota issue. 'upload_max_filesize' is set to 55 megs. No error log is
generated as PHP has, as far as it thinks, written the file.

What happens is the file gets uploaded to /tmp (full permisssions on
/tmp) and then copied to the requested directory. I can grab a
directory listing and see it in the specified directory in whole -
original size and name. If I refresh the page again the file is zero'd
out but with the original filename.

I'm hesitant to call this a bug but having bounced this off other
contacts in the industry I am left with no choice.





-- 
Edit this bug report at http://bugs.php.net/?id=34822&edit=1


#34822 [Fbk->Opn]: PHP writing empty files

2005-10-11 Thread jshay at dakotacom dot net
 ID:   34822
 User updated by:  jshay at dakotacom dot net
 Reported By:  jshay at dakotacom dot net
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: RedHat Enterprise 3.0
 PHP Version:  4.4.0
 New Comment:

link to plain text form:
http://www.tucson-wireless.com/form.php.txt

link to plain text form handler:
http://www.tucson-wireless.com/formhandler.php.txt

link to working form:
http://www.tucsom-wireless.com/admin_files.php

link to "working" form handler:
http://www.tucson-wireless.com/admin_files_formhandler.php

Thanks for your help on this.


Previous Comments:


[2005-10-11 04:14:13] [EMAIL PROTECTED]

Can you please provide us with a *short* script that consistently
reproduces this bug and that we can run? As it is now, you've only
provided us with what looks like an excerpt of the script, and if we
can't reproduce the issue, we can't tell you if it is a bug or not.
Limiting the code to an accurate representation of the problem will
help you troubleshoot anything that might be wrong with your code and,
if there's something broken with PHP, it will help us isolate it so
that we can fix it efficiently.

Thanks!

----

[2005-10-11 03:08:44] jshay at dakotacom dot net

Description:

A simple upload script uploads the file, fully intact, but then a few
seconds later zero's out the file making a zero byte length file.

Reproduce code:
---
uploading to section = $section\n");
print("file name = $upload_item_name\n");
print("file size = $upload_item_size bytes\n");
print("file in tmp = $size\n");
if (copy ($upload_item, "./$upload_item_name")) {
print("\n");
print("your file was successfully
uploaded!\n");
print("\n");
print("please note your file name -
$upload_item_name\n");
print("you will need to enter it in the
appropriate form.\n");
print("\n");
print("");
} else {
print("can't be copied - there may be another
file with this name\n");
}
}
?>

Expected result:

The file should get written to the directory specified from the form
and named the same name as the uploaded file.

Actual result:
--
Appropriate directories are writable by the apache user/group. Not a
quota issue. 'upload_max_filesize' is set to 55 megs. No error log is
generated as PHP has, as far as it thinks, written the file.

What happens is the file gets uploaded to /tmp (full permisssions on
/tmp) and then copied to the requested directory. I can grab a
directory listing and see it in the specified directory in whole -
original size and name. If I refresh the page again the file is zero'd
out but with the original filename.

I'm hesitant to call this a bug but having bounced this off other
contacts in the industry I am left with no choice.





-- 
Edit this bug report at http://bugs.php.net/?id=34822&edit=1


#34822 [NEW]: PHP writing empty files

2005-10-10 Thread jshay at dakotacom dot net
From: jshay at dakotacom dot net
Operating system: RedHat Enterprise 3.0
PHP version:  4.4.0
PHP Bug Type: *General Issues
Bug description:  PHP writing empty files

Description:

A simple upload script uploads the file, fully intact, but then a few
seconds later zero's out the file making a zero byte length file.

Reproduce code:
---
uploading to section = $section\n");
print("file name = $upload_item_name\n");
print("file size = $upload_item_size bytes\n");
print("file in tmp = $size\n");
if (copy ($upload_item, "./$upload_item_name")) {
print("\n");
print("your file was successfully
uploaded!\n");
print("\n");
print("please note your file name -
$upload_item_name\n");
print("you will need to enter it in the
appropriate form.\n");
print("\n");
print("");
} else {
print("can't be copied - there may be another file
with this name\n");
}
}
?>

Expected result:

The file should get written to the directory specified from the form and
named the same name as the uploaded file.

Actual result:
--
Appropriate directories are writable by the apache user/group. Not a quota
issue. 'upload_max_filesize' is set to 55 megs. No error log is generated
as PHP has, as far as it thinks, written the file.

What happens is the file gets uploaded to /tmp (full permisssions on /tmp)
and then copied to the requested directory. I can grab a directory listing
and see it in the specified directory in whole - original size and name.
If I refresh the page again the file is zero'd out but with the original
filename.

I'm hesitant to call this a bug but having bounced this off other contacts
in the industry I am left with no choice.

-- 
Edit bug report at http://bugs.php.net/?id=34822&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34822&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34822&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34822&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=34822&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=34822&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=34822&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=34822&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=34822&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34822&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=34822&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=34822&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=34822&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=34822&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34822&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=34822&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=34822&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34822&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34822&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=34822&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34822&r=mysqlcfg