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.

PHP upload limit

Discussion in 'General Discussion' started by sawan3, Jan 28, 2006.

  1. sawan3

    sawan3 Member

    Joined:
    Jan 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    Hi
    I have a file upload script. Now the script works fine and the file upload limit in php.ini is set to 100mb. But i just tried to upload a 30 meg file, and it didnt upload. Is there any restriction in cpanel/whm stopping me from doing this.
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    The public installation of PHP is separate from cPanel's installation, so I doubt that the two would interfere.

    What did happen when you tried to upload a 30 meg file? Did you get any error, did any data upload? How long did it take - did you hit the maximum script execution time perhaps?
     
  3. sawan3

    sawan3 Member

    Joined:
    Jan 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    It displated the progress bar for a few mins, then it returned back to the homepage.
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    Do you find any partially uploaded file in /tmp?

    Do you have phpsuexec enabled? If so, check that error_log file in the directory in from which the script was executing, and check your suexec_log. Perhaps some relevant error will be present in these files.
     
  5. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Roswell, GA
    Someone once told me that regardless of the php.ini setting, php can't upload files over 20MB.

    I can't confirm that though...
     
  6. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    Take a look at http://uk.php.net/manual/en/ini.core.php

    Check that both upload-max-filesize and post-max-size are set appropriately.

    If you've only set upload-max-filesize but not suitably altered post-max-size, you'll still have problems.
     
  7. sawan3

    sawan3 Member

    Joined:
    Jan 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    Thanks for the replies.
    Found it, just going to test.
    Also, does any value have to be changed in httpd.conf.
     
    #7 sawan3, Jan 29, 2006
    Last edited: Jan 29, 2006
  8. sawan3

    sawan3 Member

    Joined:
    Jan 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    Hi
    Still not uploading, do you think i have to make the timout longer.
     
  9. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    Not as far as I know.

    I always tend to set post-max-size to twice the value of upload-max-filesize just to be on the safe side.
     
  10. sawan3

    sawan3 Member

    Joined:
    Jan 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    OK, thanks for the reply.
    Does anyone know how to modify the timeout limit.
     
  11. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
  12. hmm

    hmm Well-Known Member

    Joined:
    Jan 11, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    India
    try increasing max_execution_time - because some slow connection might take more time to upload the script...


    Edit: Look for variable max_execution_time in php.ini and change the value..

    Deep
     
Loading...

Share This Page