Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    931
    Likes Received:
    17
    Trophy Points:
    168
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #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 :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    This problem affects all WP installs so its likely to be a server config error.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    As mentioned in first post, commenting out the upload dir or not, the error remains.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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'));
    ?>
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Nothing, it has no value. However that's normal.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Thanks for trying :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Update.
    We fixed the problem after running /scripts/upcp --force
    :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,400
    Likes Received:
    1,951
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    931
    Likes Received:
    17
    Trophy Points:
    168
    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....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice