I am running Pligg version 1.0 (just installed a few days ago) and have been experiencing problems getting the upload module (version 1.1) to successfully upload an image.
The message I receive is "ERROR: Error copying file to /.../blog.drivers-republic.com/...//modules/upload/attachments/GoodwoodcompthumbFIN", which I have traced as being initiated from the following section of code within the file upload_main.php:
You can try it for yourself at http://blog.drivers-republic.com/pligg/
Code:
if ($ext && in_array(strtolower($ext),$extensions))
{
while (file_exists("$upload_dir/$name$i.$ext")) $i++;
$name .= $i;
if (@move_uploaded_file($tmp_name, "$upload_dir/$name.$ext"))
{
$db->query("INSERT INTO ".table_prefix."files
SET file_size='orig',
file_user_id={$current_user->user_id},
file_link_id={$linkres->id},
file_real_size='{$_FILES["upload_files"]["size"][$key]}',
file_fields='".base64_encode(serialize($fields))."',
file_name='".$db->escape("$name.$ext")."'");
$count++;
$last_id = $db->insert_id;
$error = generate_thumbs("$upload_dir/$name.$ext",$linkres->id,$settings,$db->insert_id);
}
else
$error = "Error copying file to $upload_dir/$name";
}
else
$error = "Extension .$ext is not allowed"; Also, regardless of the file that I try and upload the file quoted in my error message remains the same (i.e. GoodwoodcompthumbFIN), which strikes me as an error in itself.
Before I start hacking away at the code syntax in the upload_main.php file, could someone please advise if there is any other reason that may be causing this?
Thanks





Linear Mode




