The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upload image through wordpress fails

Discussion in 'General Discussion' started by kernow, Jun 2, 2015.

  1. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Using the media manager in any wordpress install to upload images fails with the error:
    /usr/local/lib/php.ini has the upload dir commented out but the default is /tmp I believe? However commented or not it makes no difference, the error message remains.
    Any suggestions please?
     
    #1 kernow, Jun 2, 2015
    Last edited: Jun 2, 2015
  2. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Wordpress usually has it's own "temp" folder. I would suggest posting for advise on the Wordpress Support Forums. You're likely to get better support from the experts there :)
     
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    This problem affects all WP installs so its likely to be a server config error.
     
  4. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    In that case, specify "upload_tmp_dir" in the PHP config and see how that goes.
     
  5. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    As mentioned in first post, commenting out the upload dir or not, the error remains.
     
  6. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    What gets returned when you run this in it's own .php file?

    Code:
    <?php
    var_dump(ini_get('upload_tmp_dir'));
    ?>
    
     
  7. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Nothing, it has no value. However that's normal.
     
  8. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    No, that is not normal. If it returns bool(false) it means upload_tmp_dir has no value. Have you updated it directly in the php.ini file or with the PHP configuration editor in WHM?
     
  9. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    It returns:
    Code:
     string(0) ""
    which is normal for our servers , upload_tmp_dir has no value on all our servers its only one server that has this error.
     
  10. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    If it is only one server, have you compared
    Code:
    <?php
    phpinfo();
    ?>
    
    Between a few of them to check for any irregularities?
     
  11. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    phpinfo on all servers show the upload_tmp_dir to have "no value". The problem is elsewhere. EA was updated recently so maybe that's the cause.
     
  12. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    In that case, I'll leave it to cPanel to respond to this next. I'm sorry my suggestions couldn't help. I hope you reach a resolution soon.
     
  13. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Thanks for trying :)
     
  14. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Update.
    We fixed the problem after running /scripts/upcp --force
    :)
     
  15. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks for the update @kernow. That issue was bugging me all night. I was trying my best to look for another solution for you!
     
  16. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I am happy to see the issue is now resolved, however note that I don't see any cases in the 11.50 change log that would have corrected an issue with that entry in the php.ini file. Let us know if you encounter any further issues.

    Thank you.
     
  17. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Well, it was after running EA to update php to 5.5.25 that the problem started. It was by chance we discovered that after /upcp had run at its normal time on one server that the error was fixed. So forcing /upcp on the other servers also fixed it.
    Go figure....
     
Loading...

Share This Page