File Upload (kinda urgent)
| From: | Ed Lazor | Date: | Sat, 29 Jul 2000 16:15:55 +0000 |
| Subject: | File Upload (kinda urgent) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8965@lists.php.net to get a copy of this message | ||
Anyone recognize this error and know what it's solution is?
Only 0 bytes were written, expected to write 9255 in Unknown on line 0
That started showing up on my server last night. It occurs when you try to
upload files. I've tried several things to isolate and identify the problem
with no luck. I'll put a copy of the basic form I used to try testing things.
Also, here's a list of things I've tried so far. Any help you could provide
is greatly appreciated.
-Ed
Things I've Tried:
====================================
1) tested using a basic script (included below)
2) tested using small 20k - 50k jpg and zip files
3) checked php.ini to make sure no code was being prepended
4) checked php.ini to make sure the upload max size was large enough
5) verified the system has plenty of available ram (177megs free + 265meg swap)
6) verified the system has plenty of hard drive space (lowest free space on any partition was 254mb)
7) restarted the web and database server and the problem persisted
8) rebooted the server and the problem persisted
9) verified /tmp has permissions of drwxrwxrwt
10) verified the /tmp dir is empty
11) verified I can copy files to the /tmp directory
12) checked Apache's httpd.conf file to make sure nothing has changed in it and that no files are being prepended to php files.
Source code to test.php
===================================
<?
// check for file upload
if (isset($UploadedFile))
{
unlink($UploadedFile);
print "Local File: $UploadedFile <br>\n";
print "Name: $UploadedFile_name <br>\n";
print "Size: $UploadedFile_size <br>\n";
print "Type: $Uploadedfile_type <br>\n";
print "<hr>\n";
}
?>
<form ENCTYPE="multipart/form-data" action="test.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input name="UploadedFile" type="file">
<input type="submit" value="Upload">
</form>