Loading...
 
Skip to main content

Features / Usability


Errors detected on file upload

I have been getting this error on file uploads on both html files and pdf...

"Errors detected
Upload was not successful: 2EK-TL891-UG-A01.pdf"

I have checked my php upload size and the files are below the 2M setting. I have tried other pdf's and don't have any problems with upload.

I found this code in the tiki-upload_file.php:
$file_name = $_FILES%22userfile$i%22'name';
$file_tmp_name = $_FILES%22userfile$i%22'tmp_name';
$tmp_dest = $tmpDir . "/" . $file_name.".tmp";
if (!move_uploaded_file($file_tmp_name, $tmp_dest)) {
$smarty->assign('msg', tra('Errors detected'));
$smarty->display("error.tpl");
die();
}

It doesn't explain where the problem is. I've check the httpd error log file, nothing there. Is there a PHP error log file that this error is being logged to?

Thanks!
Shaun

> I have been getting this error on file uploads on both html files and pdf...
>
> "Errors detected
> Upload was not successful: 2EK-TL891-UG-A01.pdf"
>
> I have checked my php upload size and the files are below the 2M setting. I have tried other pdf's and don't have any problems with upload.
>
> I found this code in the tiki-upload_file.php:
> $file_name = $_FILES%22userfile$i%22'name';
> $file_tmp_name = $_FILES%22userfile$i%22'tmp_name';
> $tmp_dest = $tmpDir . "/" . $file_name.".tmp";
> if (!move_uploaded_file($file_tmp_name, $tmp_dest)) {
> $smarty->assign('msg', tra('Errors detected'));
> $smarty->display("error.tpl");
> die();
> }
>
> It doesn't explain where the problem is. I've check the httpd error log file, nothing there. Is there a PHP error log file that this error is being logged to?
>
> Thanks!
> Shaun
>

I have solved this problem.
As it turns out the file upload does what looks like the equivalent to a md5sum to generate a file name like
b010a98779483e87fd64a5afc3f7c587 during the upload process. So when i attempted to upload a file with a different name but was an exact copy of an existing file already on my wiki page i would get the error message.

Shaun S