From: [EMAIL PROTECTED]
Operating system: Irix 6.5
PHP version: 4.0.6
PHP Bug Type: FTP related
Bug description: can upload other files but not zip or visio files
I have file uploads working with images, Word and Excel files and text
files, but when I try to upload zip or visio files I see this message:
"Unable to open 'none' for reading. No such file or directory..." It
captures the name and mime type (application/x-zip-compressed and
application/octet-stream, resp.) but $attachment is set to 'none' and
$attachment_size is 0.
Here's the relevant part of the form:
<form method="post" name="form" action="uploadtest.php"
enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="file" name="attachment">
Here's the relevant part of the script that handles it:
$strLength1 = strlen($attachment_name);
if ($strLength1 > 0) {
$suffix1 = substr($attachment_name,($strLength1 - 4),4);
$upfile1 = "/www/pub/changecontrol/files/".$latestRecord."-1".$suffix1;
//$latestRecord is defined earlier
if (!copy($attachment,$upfile1)) {
echo "Problem: Could not move file into directory.";
exit;
}
}
Any workaround for this?
We're using Apache 1.3.18.
--
Edit bug report at http://bugs.php.net/?id=16353&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16353&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16353&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16353&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16353&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16353&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16353&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16353&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16353&r=submittedtwice