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!

PHP Warning: File upload error - unable to create a temporary file

Discussion in 'General Discussion' started by oah, Apr 24, 2019.

  1. oah

    oah Member

    Joined:
    Jan 23, 2018
    Messages:
    22
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Iraq
    cPanel Access Level:
    Website Owner
    Hi

    I am getting the following error when uploading images to my website:

    PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0

    I am running centos-7 with WHM. the current user for php-7.2 is "oah" with group "oah" although I have the "upload_tmp_dir" set to default which is "/tmp" in centos-7. I added that user to the root group but still have the same error message, do I need to set further permissions? if so, where?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @oah,

    Can you let us know the contents of the .htaccess file in the document root of the affected PHP script? Ensure to remove any identifying information from the contents when pasting it here.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. oah

    oah Member

    Joined:
    Jan 23, 2018
    Messages:
    22
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Iraq
    cPanel Access Level:
    Website Owner
    Hi @cPanelMichael
    I am not using any ht-access file at the moment.

    Thx.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @oah,

    Can you open a support ticket so we can take a closer look? You can post the ticket number here and we'll link this thread to it.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. oah

    oah Member

    Joined:
    Jan 23, 2018
    Messages:
    22
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Iraq
    cPanel Access Level:
    Website Owner
    Hi
    Thank you for your support, I solved the problem (temporarily) by adding the user to the root group ( I know that is a security risk ) but for debug purposes doing that solved the problem for me.
     
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