Search

I'm having a problem uploading an image using the file upload field I get the message: "File chosen in 'Image' was only partially uploaded due to an error." I've given write permission to the folder on the server and I don't get any message in my apache error log to help me figure this one out.

This is presumably a server misconfiguration issue, any ideas?

Could be php memory maybe?

If so try this in your .htaccess:

phpvalue memorylimit 12M

(or whatever your host limit is). I think you can also add something in your php.ini if you have access.

Ok I tried that but I still have the problem. I tried a couple of values to no avail. My default is 16M and I've checked it is being overridden correctly (phpinfo()).

I can upload with other php apps so I know my host can handle it. Does symphony use a lot of memory? Just wondering if there was a specific reason to suggest this.

Hmm. Can you tell if it is a Symphony-specific error, or Symphony outputting a php error? lack of google results suggest its Symphony...

Could it be a connection issue? Seems like if it was permissions it would be mentioned in the message.

Well Symphony is reporting the error, but I can't tell where the error is as I'm not sure how to debug it. Often I'd expect to see a message in my logs but that's empty.

The error seems to be generated by PHP. I searched the source for the error you are getting and found reference in symphony/lib/toolkit/fields/field.upload.php (the upload field code itself). There is a switch statement that acts on errors returned by PHP, and Symphony outputs a friendly message. The message you receive is caused by one of two errors:

case UPLOAD_ERR_PARTIAL:
    $message = "File chosen in '". $this->get('label')."' was only partially uploaded due to an error.";
    break;

case UPLOAD_ERR_NO_TMP_DIR:
    $message = "File chosen in '". $this->get('label')."' was only partially uploaded due to an error.";
    break;

More info here: http://ca.php.net/features.file-upload.errors

Could be an issue with your tmp directory? Perhaps try changing the $message of the UPLOADERRNOTMPDIR error, so you can distinguish exactly which one you are seeing, so that it can be narrowed down.

Fantastic - I changed that error message to be more informative and sure enough that was the problem. For some reason I hadn't set uploadtmpdir. I'm not sure why I haven't encountered this before with other software.

Thanks Nick & Andrew.

Cool, glad you got it sorted. I think the duplicate error is really a bug — the second should be more descriptive. Added to bug tracker, #296.

I think the duplicate error is really a bug

Thanks Nick, you are most correct. In this instance, Copy + Paste = fail :)

DRY!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details