1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 [SOLVED] Impossible to upload Avatars and/or Attachments

Discussion in 'Troubleshooting and Problems' started by Fredjo, Jul 8, 2015.

  1. Fredjo

    Fredjo Active Member


    As Brogan suggested here, I'm starting my own thread as I don't find the same kind of error on other threads..
    I've reinstalled my forum from scratch yesterday and since then I can't upload avatars.

    When I try from my profile, all I get is a blank screen.

    When I try to upload an attachment, here is what I get :


    I've make sure all directories (and subs) are 777.

    This is what I get in the logs :

    Error Info
    ErrorException: Fatal Error: syntax error, unexpected end of file - library/XenForo/Image/Gd.php:140
    Generated By: Fred, 1 minute ago
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Request State
    array(3) {
    ["url"] => string(120) "http://esra-league.com/forum/index.php?attachments/do-upload.json&hash=f3fe1055d0cc56e3b726990296fbed24&content_type=post"
    ["_GET"] => array(3) {
    ["attachments/do-upload_json"] => string(0) ""
    ["hash"] => string(32) "f3fe1055d0cc56e3b726990296fbed24"
    ["content_type"] => string(4) "post"
    ["_POST"] => array(7) {
    ["Filename"] => string(8) "Pong.gif"
    ["_xfResponseType"] => string(4) "json"
    ["_xfSessionId"] => string(32) "75d0522ae45ca87d9642b67fa173c5f1"
    ["_xfNoRedirect"] => string(1) "1"
    ["content_data"] => array(1) {
    ["thread_id"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["Upload"] => string(12) "Submit Query"
    Thanks for the help in advance,

  2. Brogan

    Brogan XenForo Moderator Staff Member

    The error seems to indicate a problem with one of the files.

    Can you run the file health check?
    Also try uploading the library/XenForo/Image/Gd.php file again, from a fresh download .zip from your customer area.
  3. Fredjo

    Fredjo Active Member

    Thanks Brogan :

    File Health Check
    Potential Problems
    [*]library/XenForo/ControllerAdmin/Feed.phpFile does not contain expected contents.
    [*]library/XenForo/Image/Gd.phpFile does not contain expected contents.
    [*]library/XenForo/DataWriter/ProfilePostComment.phpFile does not contain expected contents.
    I'll upload the file again tonight. Thanks a lot for your answer.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I would recommend downloading a new copy of the upgrade .zip from your customer area and uploading all files again.

    If possible, use cPanel and extract the .zip on the server, otherwise use something like WinSCP.
    I don't recommend using FileZilla as we have had numerous reports of issues with it.
    Fredjo and Divvens like this.
  5. Fredjo

    Fredjo Active Member

    I used FileZilla indeed :confused: how do you know :D

    I'll try that. Thanks again @Brogan (y)
  6. Fredjo

    Fredjo Active Member

    Solved with reuploading GD.php

    Thanks @Brogan !
  7. Tracy Perry

    Tracy Perry Well-Known Member

    Because FileZilla blows chunks (normally out of the code it's uploading). It's been a recurring problem seen often.
    Fredjo likes this.
  8. Fredjo

    Fredjo Active Member

    That is very nice to know and I'll use SCP from now on ;)

Share This Page