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!

File upload lays error 500

Discussion in 'General Discussion' started by osenouci, Feb 21, 2013.

  1. osenouci

    osenouci Member

    Joined:
    Feb 21, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am using WHM 11.34.1 (build 7) on a vps running centos 5.3. I have created an account and uploaded a website to it. When I upload a file using PHP file the server lays out error 500.

    I have checked the file permissions but nothing so far.I have no idea why the access log is not being written to.

    CGI/FastCGI

    I have done more checks on it and it seems like the file is being uploaded successfully however when the script that moves it is called, meaning when the form url is called I am getting error 500.

    This is really strange.
     
    #1 osenouci, Feb 21, 2013
    Last edited: Feb 21, 2013
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What does this mean? Can you be more specific?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. osenouci

    osenouci Member

    Joined:
    Feb 21, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The upload starts and when the file gets submitted to PHP script that handles moving the file, I get the error 500. The script that handles the upload is located on on same page as the script that handles moving the file.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Is the server running SuPHP?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. osenouci

    osenouci Member

    Joined:
    Feb 21, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have looked for mod_suphp in phpinfo() and there are no traces for it. However I have noticed that the directory permissions were named after the user account that I created using cpanel.
     
  6. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    11
    Trophy Points:
    168
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Look what is the "Server API" in phpinfo.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. osenouci

    osenouci Member

    Joined:
    Feb 21, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    CGI/FastCGI
     
  8. osenouci

    osenouci Member

    Joined:
    Feb 21, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have done more checks on it and it seens like the file is being uploaded successfully however when the script that moves it is called, meaning when the form url is called I am getting error 500.
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sounds like you are not running SuPHP to me.

    How large is the file you're uploading?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    11
    Trophy Points:
    168
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Means you use suPHP, and there should not be problems with file/directory rights if owner/group is the cPanel user and files are 644 and directories 755.

    - - - Updated - - -

    Really?
    All our servers run suPHP and Server API = CGI/FastCGI.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Well:

    That's what that sounds like to me.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Or the script requires a PHP module that is not installed, or the script runs out of memory, or the script reaches the PHP max_execution_time, or the script is killed by CSF or similar, or there is a .htaccess problem, or 1 of 100 other different reasons.

    Error 500 is a generic error message. Without checking the Apache error logs (/usr/local/apache/logs/error_log), any suggestions are basically guesswork.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #12 LDHosting, Feb 21, 2013
    Last edited: Feb 21, 2013
  13. osenouci

    osenouci Member

    Joined:
    Feb 21, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have found the problem. My initial problem was that there was nothing written in the access error logs. I have finally managed to solve this. Apparently GD was not installed. I have recompiled PHP with GD and it worked like a charm.

    Thanks for all of ya for trying to help. It was a pleasure.
     
  14. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    'Sounds like', is guesswork. Nothing more. Thank you for straightening me out though. You are correct, it could be 1 of 1000 things. And, with no mention of trying to upload images in this thread:
    We only had 999 more reasons to go, to figure it out. We were almost there! :p
     
    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