3

This is an EE1 site. Whenever I try to upload a PDF I get an error message saying that there was a problem uploading this file. The permissions on the server are still set to 777 and the XSS filtering is off. I have no idea what else it could be.

Here is the exact error message:

PDF – There was a problem uploading ‘TEST.pdf’

10
  • 1
    Is it just PDFs, or other files as well? Have you tried PDFs of different sizes? Can you upload via the File Manager? Have you tried uploading into fields which use different directories in other channels? Jan 24, 2013 at 17:58
  • 1
    Can you confirm that the Allowed File Types is set to All Files (vs. Images Only) under the File Manager > File Upload Preferences screen?
    – Ben Schaaf
    Jan 24, 2013 at 18:34
  • 1
    Yea sure: manercpa.com/images/uploads/screen-shot.png
    – Ajay
    Jan 24, 2013 at 19:25
  • 1
    Hmm, this is a silly question, but is that EE2? or EE1? Are you on the latest build? Something doesn't look quite right. My Allow File Types is a select option, not radio. I thought that changed in EE1 > EE2
    – Ben Schaaf
    Jan 24, 2013 at 19:55
  • 1
    So, when you tagged this with ee2 and said "This is a EE2 site", you meant to say this is an EE1 site. Got it :P Are you on the latest build of EE1? You should be able to do that for free, should be your first step (after taking a backup, of course)
    – Ben Schaaf
    Jan 25, 2013 at 4:05

1 Answer 1

1

Having searched an old EE 1 site's source it looks as though that's an error triggered by Mark Huot's File fieldtype. Here's the corresponding code snippet from ext.mh_file_ext.php:

foreach($file_tmp_names as $file_key=>$file_tmp_name)
{
    if(@move_uploaded_file($file_tmp_name, $server_path.$file_names[$file_key]) === FALSE)
    {
        $errors[] = str_replace(array('%{field}', '%{file}'), array($file_field['field_label'], $file_names[$file_key]), $LANG->line('error_transfer'));
    }
}

Presumably you have an invalid path configured somewhere or this is a permissions issue. If you remove the @ before move_uploaded_file that will disable error suppression and you should see a PHP error that details exactly why the upload has failed.

1
  • Ok I will try this and get back to you on what the results are.
    – Ajay
    Jan 25, 2013 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.